0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00
Commit graph

1557 commits

Author SHA1 Message Date
Loïc Hoguin
4fd6e2f7cd
Accept sendfile tuple with 0 length in cowboy_req
This will result in no data being sent. It's simply easier to
do this than to have to handle 0 size cases in user code.
2017-09-04 20:48:07 +02:00
Loïc Hoguin
0995fc99e0
Add a static handler test with an empty file 2017-09-04 18:00:56 +02:00
Loïc Hoguin
0828e0b9ce
Alphabetical order some tests 2017-09-04 15:48:46 +02:00
Loïc Hoguin
58e9e76814
Fix more documentation todos
I have decided not to include a manual page for
cowboy_stream_h at this point because it clashes
with the cowboy_stream manual page. This decision
will be revisited in the future.
2017-09-04 14:33:44 +02:00
Loïc Hoguin
47aa0097ed
Add OTP 20.0.4 to CI 2017-08-29 11:29:30 +02:00
Loïc Hoguin
3d8339267b
Cowboy 2.0.0-rc.2 2017-08-23 15:04:57 +02:00
Loïc Hoguin
9a1810bf13
Tentative fix for out of order queued data 2017-08-21 16:55:30 +02:00
Loïc Hoguin
daef32d907
Properly clean up timers when terminating 2017-08-21 14:40:01 +02:00
Loïc Hoguin
a2facaf2da
Add tests for the streams shutdown mechanism 2017-08-14 17:17:44 +02:00
Loïc Hoguin
58b70a594b
Remove broken links from examples README 2017-08-09 09:47:56 +02:00
Loïc Hoguin
c0ec1ad4a9
Add missing cowboy_children module
My bad! Still new at this.
2017-08-08 21:39:23 +02:00
Loïc Hoguin
b5defc6e0d
Add OTP-20.0.2 to CI 2017-08-08 17:11:45 +02:00
Loïc Hoguin
45ddcd8c67
Implement the shutdown timeout for request processes
This should work very similar to normal supervisors,
in particular during the shutdown sequence when the
connection process goes down or switches to Websocket.

Processes that need to enforce the shutdown timeout
will be required to trap exits, just like in a supervisor.
In a vanilla Cowboy, this only matters at connection
shutdown, as Cowboy will otherwise wait for the request
process to be down before stopping the stream.

Tests are currently missing.
2017-08-08 16:59:33 +02:00
Loïc Hoguin
4fa7aeb0fd
Fix HTTP/2 server push
Cowboy was encoding the headers then decoding them when initializing
the request. The problem is that the encoding and decoding contexts
are not the same. Now, Cowboy will directly use the headers it
received in the push command for the new request. This is also
more efficient.

I am surprised it worked at all considering the issue.
2017-07-26 17:36:41 +02:00
Loïc Hoguin
238ac3afc6
Update version to 2.0.0-rc.1 2017-07-24 11:57:47 +02:00
Loïc Hoguin
9860eb88c1
Small tweak to the guide 2017-07-24 11:55:12 +02:00
Loïc Hoguin
95da4f8f18
Write an initial draft of the streams chapter 2017-07-23 18:54:05 +02:00
Loïc Hoguin
53a24b990e
Remove yet another outdated todo 2017-07-23 18:53:48 +02:00
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
e7a65406a7
Remove the broken examples
Hooks are gone, and we won't be able to stream body in REST
in Cowboy 2.0-rc.1, and might not in 2.0 either. That is,
other than via halting the processing.
2017-07-19 18:42:44 +02:00
Loïc Hoguin
b5e43527df
Tweak the migration guide 2017-07-19 13:45:55 +02:00
Loïc Hoguin
804f16c356
Remove CHANGELOG
Please consult the appendixes in the user guide.
2017-07-19 00:57:09 +02:00
Loïc Hoguin
49d13ece19
Update rebar.config 2017-07-19 00:50:11 +02:00
Loïc Hoguin
e0588f4e8e
Websocket options are no longer per listener 2017-07-19 00:49:48 +02:00
Loïc Hoguin
ac426c9ed0
Add a guide appendix on migrating from Cowboy 1.0 2017-07-19 00:47:55 +02:00
Steven Magelowitz
7eb0072b06
Req Body length can be a non_neg_integer or infinity 2017-07-15 10:42:48 +02:00
Loïc Hoguin
404ad037a1
Update Erlang.mk 2017-07-14 21:44:39 +02:00
Loïc Hoguin
7d9f6611ae
Fix the remaining http_SUITE test cases 2017-07-14 19:09:42 +02:00
Loïc Hoguin
23fcfe9eea
Fix more of the older tests
The Cowboy behavior has changed a little and gives more
accurate error responses now. And in some cases, successes.
2017-07-13 00:20:56 +02:00
Loïc Hoguin
ddb0c4f3b6
Fix a few of the older tests 2017-07-12 19:40:52 +02:00
Loïc Hoguin
cf4d8166f8
Remove tests for set_resp_body with a stream fun 2017-07-12 19:25:56 +02:00
Loïc Hoguin
ff3915a243
Catch more 400 errors 2017-07-12 19:20:31 +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
acc5fed589
Remove the onresponse tests from http_SUITE 2017-07-12 18:36:49 +02:00
Loïc Hoguin
13ba35f2f0
Disable testing of ErlLLVM 2017-07-12 17:48:51 +02:00
Loïc Hoguin
949dbb5434
Update to Cowlib 2.0.0-rc.1
Also update the Erlang versions tested on CI.
2017-07-12 17:42:50 +02:00
Loïc Hoguin
5a272e4fbe
Aggregate validation errors and pass them in exception 2017-07-01 16:40:30 +02:00
Loïc Hoguin
2bcb390257
Update version to 2.0.0-pre.10 2017-06-28 20:15:52 +02:00
Loïc Hoguin
490fbbe2f7
Update OTP versions 2017-06-28 20:15:24 +02:00
Loïc Hoguin
09506e7b5f
Fix wrong percent encoding in a router test 2017-06-28 18:59:20 +02:00
Loïc Hoguin
eb1a06cf5d
Remove the cyrillic latin1 test
These characters are not allowed in URI paths.
2017-06-28 18:57:51 +02:00
Loïc Hoguin
12b5e78aaa
Fix unit tests in cowboy_router following interface changes 2017-06-28 18:57:04 +02:00
Loïc Hoguin
c221730371
Improve the interface for constraints
There are two important changes in this commit.

Constraints are now producing an error tuple. This error tuple
in turn can be provided to a function for formatting a human
readable error message. Both the error tuple and the formatting
code are controlled by and part of the constraint function.

Constraints now also implement the reverse operation.
When constraint functions only validate, the reverse operation
will be the same as the forward operation. When they also do
some conversion then the reverse operation will reverse it.

Since constraints are now performing 3 different operations
(forward, reverse and format_error), they now take the form
of a function accepting two separate arguments. The operation
is the first argument.

In addition, the return value was changed to take the form
of {ok, Value} | {error, Reason}. The value must be returned
as-is if it was not modified.
2017-06-28 17:38:17 +02:00