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

1528 commits

Author SHA1 Message Date
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
Loïc Hoguin
3eb7693e4f
Remove outdated multipart tests
They have equivalents in req_SUITE.
2017-06-28 13:07:44 +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
767da623f1
Fix terminate not being called on connection close in HTTP/1.1
Introduces the new stream_handler_SUITE test suite. More cases
will be added later on.
2017-06-02 12:31:00 +02:00
Loïc Hoguin
cbf7972f10
Don't terminate streams that were already terminated
This and the issues in the last two commits were reported
by leo2007 on IRC.
2017-05-31 13:20:12 +02:00
Loïc Hoguin
cad3e3f63d
Fix bad accounting of HTTP/2 windows
The previous code was incorrectly substracting the maximum
frame size we could send when the data we were actually sending
was much lower.
2017-05-31 12:49:21 +02:00
Loïc Hoguin
18e2d684b3
Apply the received SETTINGS frame 2017-05-31 12:48:22 +02:00
Loïc Hoguin
5f421f93bc
Introduce the req_filter Websocket option
This option allows customizing the compacting of the Req object
when using Websocket. By default it will keep most public fields
excluding headers of course, since those can be large.
2017-05-28 20:19:39 +02:00
Loïc Hoguin
8cb125dbb7
Fix a harmless warning in tests 2017-05-23 14:10:05 +02:00
Loïc Hoguin
9ef4536656
Add many tests for RFC7540 5.1 and 5.1.1 and related fixes 2017-05-23 14:09:38 +02:00
Loïc Hoguin
4048f16365
Add a test suite for h2spec
h2spec must be preinstalled on the machine and its location
pointed at by the H2SPEC environment variable.
2017-05-23 14:05:00 +02:00
Loïc Hoguin
8ed44cd9a9
Add another RFC to the list of specs 2017-05-20 12:35:20 +02:00
Loïc Hoguin
2ad057ab1c
Update to 2.0.0-pre.9 2017-05-19 20:23:01 +02:00
Loïc Hoguin
f3e5f3e410
Preliminary h2 flow control support
Existing tests pass. A number of things remain to be done.
Has only been tested with Gun so far. Feedback welcome!
2017-05-19 20:18:00 +02:00
Alexandre Snarskii
304e3efbf8
make set_env working with maps. 2017-05-07 18:39:47 +02:00
Loïc Hoguin
78af194e07
Add a test for cowboy:set_env 2017-05-07 18:39:43 +02:00
Gary Rennie
4d92487f84
Add test for inactivity_timeout option in cowboy_http2
The inactivity timeout is used to close the connection in the absence of
any data from the client.

Since this is not part or the rfc7540 spec, a new http2_SUITE module has
been created with a test for the inactivity_timeout.
2017-05-05 18:46:12 +02:00
Steven Magelowitz
f302ce2b83
length can be a non_neg_integer or infinity 2017-05-05 17:55:18 +02:00
Loïc Hoguin
8ef1382f0a
Add OTP 19.3.3 and 20-rc1 to CI; remove OTP 18 2017-05-05 16:39:49 +02:00
Loïc Hoguin
96bbf6752f
Properly handle 101 upgrade responses for Websocket 2017-05-05 16:10:15 +02:00
Loïc Hoguin
7db724f04a
Add inactivity_timeout and other options improvements 2017-05-05 13:48:25 +02:00
Loïc Hoguin
6100470c90
Kill all children processes when terminating the connection
This is a more or less temporary solution to an existing problem.
In the future we will need to enforce a shutdown timeout for
these processes.
2017-05-03 18:31:28 +02:00
Loïc Hoguin
95d2855f62
Add the idle_timeout HTTP/1.1 protocol option
This fixes the connection being dropped because of request_timeout
despite there being some active streams.
2017-05-03 17:44:00 +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
b403f26da6
Remove an outdated todo comment 2017-04-18 16:36:03 +02:00
Loïc Hoguin
b7210d6d1a
Get rid of stray messages when killing HTTP/2 request processes 2017-04-18 16:33:41 +02:00
Loïc Hoguin
061cc227b1
Make the default 204 response go through stream handlers 2017-04-18 16:07:01 +02:00