aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-12-15Fix static_handler suite code pathLoïc Hoguin
A future OTP release will use 'strict' code path by default. This change ensures it works both for old and new OTP.
2023-12-14Change send_timeout_close test to accomodate macOSLoïc Hoguin
2023-12-12Handle socket errors in HTTP/1.1 and HTTP/2Loïc Hoguin
Doing so will let us notice when the connection is gone instead of waiting for timeouts, at least in the cases where the remote socket was closed properly. Timeouts are still needed in case of TCP half-open problems. This change means that the order of stream handler commands is more important than before because socket errors may occur during the processing of commands.
2023-12-12Add test for send_timeout_closeSergei Shuvatov
LH: I reworked the test a little and added the same test for HTTP/2 so that both HTTP/1.1 and HTTP/2 get the issue fixed.
2023-12-07Note that we won't implement the HTTP/2 PRIORITY mechanismLoïc Hoguin
2023-12-07Fix position of rate_limited/2 callback in REST workflow guideLoïc Hoguin
2023-12-07Add UTF-8 support to example file_serverlin
LH: I have fixed issues in the PR and incorporated changes from a sister PR by @djankovic (git author: Dom J). I also made sure the UTF-8 files were readable without Chinese fonts and added their downloading to the examples test suite.
2023-12-07Fix Websocket subprotocol exampleLoïc Hoguin
2023-12-07Fix echo_post exampleAnatolii Kosorukov
Fix input parameter of `cowboy_req:reply` function.
2023-12-06Fix typos in documentationKian-Meng, Ang
2023-12-06Remove official IRC channelMaria Scott
2023-12-06Add 'max_cancel_stream_rate' config for the rapid reset attackViktor Söderqvist
Co-authored-by: Björn Svensson <[email protected]>
2023-12-04Remove unneeded Makefile variablesLoïc Hoguin
2023-12-01Use init_per_suite instead of all/0 for init in tracer_SUITELoïc Hoguin
2023-12-01Don't dialyze the tests by defaultLoïc Hoguin
2023-12-01Reduce CT logs size in a couple test casesLoïc Hoguin
2023-12-01Use GitHub actions for testing CowboyLoïc Hoguin
Now tested against OTP-24+. Erlang.mk has been updated as well.
2023-11-23Don't force verify client cert in testsLoïc Hoguin
This makes req_SUITE's cert_undefined test work again.
2023-05-02Fix Ranch link in user guideLoïc Hoguin
2023-04-28Cowboy 2.10.02.10.0Loïc Hoguin
2023-03-30We are not using erl_make_certs anymoreLoïc Hoguin
2023-03-30Fix tests with serialised mapsLoïc Hoguin
The key order of serialised maps changed in OTP-26.
2023-03-30Fix TLS tests for OTP-26+Loïc Hoguin
ct_helper now uses the test certificates generated by public_key. A few adjustments had to be made as a result.
2023-03-30Fix OTP-26+ warnings in test suitesLoïc Hoguin
2023-03-29Update Cowlib to 2.12.1Loïc Hoguin
2023-03-29Fix tests for OTP-25+Loïc Hoguin
2022-09-19Update Erlang.mkLoïc Hoguin
2022-09-19Fix data sent after RST_STREAM in HTTP/2 in rare casesLoïc Hoguin
2022-07-12Update LICENSE copyright yearLoïc Hoguin
2021-05-12Add Hex metadataLoïc Hoguin
2021-05-12Cowboy 2.9.02.9.0Loïc Hoguin
2021-04-24Two more HTTP specsLoïc Hoguin
2021-04-24Cowlib 2.11.0 and Ranch 1.8.0Loïc Hoguin
2020-11-27AcceptCallback may now return created/see_other tuples for POSTMartin Björklund
They replace and deprecate the {true,URI} return value.
2020-11-27Also include trace messages when timestamp flag isn't usedSebastian Strollo
2020-11-27Use functions for inititalizing rate limitingSimon Johansson
... to ensure that the same values are used in all places.
2020-11-27Graceful shutdownViktor Söderqvist
Note: This commit makes cowboy depend on cowlib master. Graceful shutdown for HTTP/2: 1. A GOAWAY frame with the last stream id set to 2^31-1 is sent and a timer is started (goaway_initial_timeout, default 1000ms), to wait for any in-flight requests sent by the client, and the status is set to 'closing_initiated'. If the client responds with GOAWAY and closes the connection, we're done. 2. A second GOAWAY frame is sent with the actual last stream id and the status is set to 'closing'. If no streams exist, the connection terminates. Otherwise a second timer (goaway_complete_timeout, default 3000ms) is started, to wait for the streams to complete. New streams are not accepted when status is 'closing'. 3. If all streams haven't completed after the second timeout, the connection is forcefully terminated. Graceful shutdown for HTTP/1.x: 1. If a request is currently being handled, it is waited for and the response is sent back to the client with the header "Connection: close". Then, the connection is closed. 2. If the current request handler is not finished within the time configured in transport option 'shutdown' (default 5000ms), the connection process is killed by its supervisor (ranch). Implemented for HTTP/1.x and HTTP/2 in the following scenarios: * When receiving exit signal 'shutdown' from the supervisor (e.g. when cowboy:stop_listener/3 is called). * When a connection process is requested to terminate using sys:terminate/2,3. LH: Edited tests a bit and added todos for useful tests to add.
2020-11-23Use gun:ws_send/3 in testsLoïc Hoguin
2020-11-23Don't produce an error report for normal stream process exitsLoïc Hoguin
2020-10-07Update Erlang.mkLoïc Hoguin
2020-08-19Minor grammar correctionsThomas Sciaroni
Verb agreement error "The request process executes middlewares which, by default, including the router and then the execution of handlers." -> "The request process executes middlewares. By default, the request process executes the router and then the handlers." Adverbial clause at beginning of sentence needs comma "By default Cowboy comes..." -> "By default, Cowboy comes..."
2020-07-03Fix concurrent body streaming getting stuck with HTTP/2Loïc Hoguin
2020-07-01Tweak a sentence in the guideLoïc Hoguin
Thanks Tamir Halperin for pointing this out. [skip ci]
2020-05-28Fix the cowboy_req:inform/3 example in the manualLoïc Hoguin
2020-05-23Remove jQuery, cleanup Websocket example a bit2.8.0Loïc Hoguin
2020-05-21Cowboy 2.8.0Loïc Hoguin
2020-05-20204 and 304 responses must not include a bodyLoïc Hoguin
When calling cowboy_req:reply/4 with a body a crash will occur resulting in a 500 response. When calling cowboy_req:stream_reply/2,3 and then attempting to send a body a crash will occur.
2020-05-20Increase the default max_keepalive HTTP option to 1000Loïc Hoguin
100 is very low for current deployments. 1000 is more appropriate as a default value.
2020-05-20Don't stop listeners that don't exist in static_handler_SUITELoïc Hoguin
2020-05-20Clarify the routing algorithmLoïc Hoguin