0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 12:40:25 +00:00
Commit graph

177 commits

Author SHA1 Message Date
Loïc Hoguin
d4fb6571b3
Update the constraints chapter 2017-07-23 15:30:32 +02:00
Loïc Hoguin
0556fb027c
Update the flowchart chapter 2017-07-23 09:48:25 +02:00
Loïc Hoguin
5bb2003afc
Add a related RFC for Websocket
This is important because it clarifies that sec-websocket-protocol
is case sensitive when matching. Only the registry is case
insensitive.
2017-07-20 18:30:17 +02:00
Loïc Hoguin
3099fc1d9f
Remove cowboy_sub_protocol from the documentation
This will be reintroduced in a future release once the
interface stabilizes. For the time being it will be an
internal module only.
2017-07-20 18:28:06 +02:00
Loïc Hoguin
e4cab480dc
Remove the old architecture chapter 2017-07-19 23:03:14 +02:00
Loïc Hoguin
a832369a02
Remove the guide chapter about broken clients
None of these workarounds currently exist in Cowboy 2.0.
We can resurrect the chapter later if it's still necessary,
once we've added the workarounds back in some other form.
2017-07-19 22:15:59 +02:00
Loïc Hoguin
0001956d3b
Fix the name of an option in the migration guide 2017-07-19 19:10:21 +02:00
Loïc Hoguin
381a193626
Remove hooks from the user guide
They're gone!
2017-07-19 19:04:48 +02:00
Loïc Hoguin
b5e43527df
Tweak the migration guide 2017-07-19 13:45:55 +02:00
Loïc Hoguin
ac426c9ed0
Add a guide appendix on migrating from Cowboy 1.0 2017-07-19 00:47:55 +02:00
Loïc Hoguin
3c18585945
Remove any mention of the waiting_stream hack 2017-07-12 18:55:09 +02:00
Loïc Hoguin
f425f7478a
Add another RFC to the pile 2017-06-28 12:07:28 +02:00
Loïc Hoguin
47eaadb209
Fix a confusing code snippet
Reported by Jordan Chaitin.
2017-06-14 15:07:31 +02:00
Loïc Hoguin
ec00e3d60e
Make cowboy_req:read_part return multipart headers as map 2017-06-09 16:57:11 +02:00
Loïc Hoguin
6f7b59886e
Remove NumAcceptors argument from start_clear/tls
They are now cowboy:start_clear/3 and cowboy:start_tls/3.
The NumAcceptors argument can be specified via the
num_acceptor transport option. Ranch has been updated
to 1.4.0 to that effect.
2017-06-07 15:15:54 +02:00
Loïc Hoguin
8ed44cd9a9
Add another RFC to the list of specs 2017-05-20 12:35:20 +02:00
Gary Rennie
73b4eb94ff
Update Websocket handler docs default timeout
This was changed from infinity to 60s in
a45813c60f
2017-04-18 17:51:21 +02:00
Loïc Hoguin
3633bceac5
Add more RFCs to the specs list 2017-04-18 12:35:45 +02:00
Loïc Hoguin
14a01f71cb
Add a guide chapter linking to all specs 2017-03-20 14:21:42 +01:00
Loïc Hoguin
9255cdf1d7
Change the type of bindings from a list to a map
Maps make more sense because the keys are unique.
2017-02-19 16:51:16 +01:00
Loïc Hoguin
91ae70b06c
Change the order of set_resp_cookie arguments
The Opts value is put last, to be more consistent with the
rest of the cowboy_req module.

Additionally a test handler was fixed which reduced the number
of errors in http_SUITE.
2017-02-19 09:46:11 +01:00
Loïc Hoguin
a45813c60f
Allow passing options to sub protocols
Before this commit we had an issue where configuring a
Websocket connection was simply not possible without
doing magic, adding callbacks or extra return values.
The init/2 function only allowed setting hibernate
and timeout options.

After this commit, when switching to a different
type of handler you can either return

  {module, Req, State}

or

  {module, Req, State, Opts}

where Opts is any value (as far as the sub protocol
interface is concerned) and is ultimately checked
by the custom handlers.

A large protocol like Websocket would accept only
a map there, with many different options, while a
small interface like loop handlers would allow
passing hibernate and nothing else.

For Websocket, hibernate must be set from the
websocket_init/1 callback, because init/2 executes
in a separate process.

Sub protocols now have two callbacks: one with the
Opts value, one without.

The loop handler code was largely reworked and
simplified. It does not need to manage a timeout
or read from the socket anymore, it's the job of
the protocol code. A lot of unnecessary stuff was
therefore removed.

Websocket compression must now be enabled from
the handler options instead of per listener. This
means that a project can have two separate Websocket
handlers with different options. Compression is
still disabled by default, and the idle_timeout
value was changed from inifnity to 60000 (60 seconds),
as that's safer and is also a good value for mobile
devices.
2017-02-18 18:26:20 +01:00
Loïc Hoguin
43adacc760
Welcome to 2017 2017-01-02 19:36:36 +01:00
Loïc Hoguin
271e31c629
Various fixes and tweaks to the user guide 2017-01-02 14:46:19 +01:00
Loïc Hoguin
5838a0c81a
Add templates as Erlang.mk plugin 2016-12-28 17:54:50 +01:00
Loïc Hoguin
f7094ad78f
Update the cowboy_rest manual 2016-12-28 15:17:43 +01:00
Loïc Hoguin
5477d613f9 Tweak the one-liner description of the project 2016-09-29 22:46:26 +02:00
Loïc Hoguin
31cabe0fb9 Use spaces in snippets in the guide 2016-09-14 18:51:11 +02:00
Loïc Hoguin
a231216b07 Update the Websocket handlers chapter 2016-09-14 18:39:17 +02:00
Loïc Hoguin
06e1e2be68 Update the routing chapter 2016-09-04 19:47:09 +02:00
Loïc Hoguin
8777f631ca Rework the constraints chapter 2016-09-04 19:09:51 +02:00
Loïc Hoguin
2a6359ecc1 Minor updates to static files chapter 2016-09-02 14:55:40 +02:00
Loïc Hoguin
2474ce9d73 Update the multipart chapter 2016-09-02 12:59:45 +02:00
Loïc Hoguin
67c5b057f9 Update the Websocket protocol chapter 2016-09-01 17:42:41 +02:00
Loïc Hoguin
5495b57174 Update the cookies guide chapter 2016-09-01 17:22:53 +02:00
Loïc Hoguin
88dbc30391 Merge branch 'master' of https://github.com/alexprut/cowboy 2016-08-31 17:02:23 +02:00
Loïc Hoguin
aa617f2330 Update the guide chapter for responses 2016-08-31 17:01:25 +02:00
Alex Prut
b58093a3c7 Update websocket documentation: based on https://github.com/ninenines/cowboy/blob/master/examples/websocket/src/ws_handler.erl 2016-08-31 12:42:50 +02:00
Loïc Hoguin
bae10829ba Add the missing listeners guide chapter
While incomplete it's still a pretty good start.
2016-08-30 14:27:55 +02:00
Loïc Hoguin
8fc1371df8 Minor documentation fixes
"make docs" should now work again.
2016-08-30 14:18:14 +02:00
Loïc Hoguin
4c6f2c9a95 Fix a couple xref links
They were still using the old ezdoc syntax.
2016-08-30 13:23:31 +02:00
Loïc Hoguin
843866c654 Add placeholder flow diagram chapter 2016-08-30 13:07:35 +02:00
Loïc Hoguin
9b8a05bbc1 Fix rendering issues in the guide and manual 2016-08-30 13:03:26 +02:00
Loïc Hoguin
bee1320700 Update the body reading chapter 2016-08-25 17:40:37 +02:00
Loïc Hoguin
7839f13671 More 2.0 documentation updates
Still incomplete.
2016-08-24 17:25:33 +02:00
Loïc Hoguin
fb6940599c Wording tweak in static handler chapter in the guide 2016-06-06 16:12:24 +02:00
Loïc Hoguin
b5a40256dd Partial update of the user guide
I will do more breaking changes before documenting more.
2016-05-24 14:50:27 +02:00
Loïc Hoguin
7bdd710849 Completely remove SPDY 2016-03-06 17:48:35 +01:00
Loïc Hoguin
dbb636034f Minor grammar improvements from Derek Brown
[ci-skip]
2016-01-15 16:16:56 +01:00
Loïc Hoguin
3d48e58111 Make the getting started properly use master 2016-01-15 11:19:59 +01:00