aboutsummaryrefslogtreecommitdiffstats
path: root/test/req_SUITE.erl
AgeCommit message (Collapse)Author
2024-03-26Initial HTTP/3 implementationhttp3Loïc Hoguin
This includes Websocket over HTTP/3. Since quicer, which provides the QUIC implementation, is a NIF, Cowboy cannot depend directly on it. In order to enable QUIC and HTTP/3, users have to set the COWBOY_QUICER environment variable: export COWBOY_QUICER=1 In order to run the test suites, the same must be done for Gun: export GUN_QUICER=1 HTTP/3 support is currently not available on Windows due to compilation issues of quicer which have yet to be looked at or resolved. HTTP/3 support is also unavailable on the upcoming OTP-27 due to compilation errors in quicer dependencies. Once resolved HTTP/3 should work on OTP-27. Because of how QUIC currently works, it's possible that streams that get reset after sending a response do not receive that response. The test suite was modified to accomodate for that. A future extension to QUIC will allow us to gracefully reset streams. This also updates Erlang.mk.
2024-01-25Refresh copyright linesLoïc Hoguin
2024-01-23Fix match_qs with constraints when key is not presentgeeksilva97
Original fix by Ali Farhadi <[email protected]>.
2024-01-18Retry the read_urlencoded_body_too_large if timeout triggersLoïc Hoguin
This is caused by the timeout being 1s after the period. When the CI environment is overloaded, sometimes the timeout will trigger. We retry, knowing that the timetrap will catch us if we retry too much.
2024-01-17Improve reliability of a few testsLoïc Hoguin
GitHub Actions runners are not as good as self-hosted BuildKite so some adjustments need to be made to timeouts and such.
2024-01-15Reject responses with explicit set-cookie headergeeksilva97
LH: The tests received a lot of fixes and tweaking. I also reworded the error message to be more concise.
2024-01-09Better error message when trying to reply twiceLoïc Hoguin
Also crash if trying to push after a reply was sent.
2024-01-08Document body reading in auto modeLoïc Hoguin
It is now tested both via cowboy_req:read_body and via cowboy_req:cast. Removes a bad example from the guide of body reading with period of infinity, which does not work.
2023-12-01Reduce CT logs size in a couple test casesLoï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-29Update Cowlib to 2.12.1Loïc Hoguin
2020-07-03Fix concurrent body streaming getting stuck with HTTP/2Loïc Hoguin
2020-04-08Increase the timetrap timeout in req_SUITE on WindowsLoïc Hoguin
Still seeing intermittent failures on Windows due to timetrap so let's see if doubling the timeout again helps.
2020-04-06Increase the req_SUITE timetrap timeout on WindowsLoïc Hoguin
The local network is much slower so the tests take longer there.
2020-04-02Make req_SUITE:read*_body_urlencoded_too_long tests reliableLoïc Hoguin
2020-04-02Use infinity timeout for gun:await* calls in req_SUITELoïc Hoguin
2020-04-02Rework the req_SUITE:read_body_period testLoïc Hoguin
To avoid intermittent test failures. We only want to make sure the function eventually returns so we don't need to use timeouts in the test itself, or check exactly what was read.
2020-04-01Change a few flaky tests to use timetrap and infinity timeoutsLoïc Hoguin
The experiment was successful in Gun, let's see if it helps with Cowboy as well.
2020-03-30Fix the req_SUITE:parse_cookie testLoïc Hoguin
We now allow spaces in cookie names.
2019-12-31Test trailers bug when there are data frames in queueTony Han
2019-10-05Add cowboy_req:filter_cookies/2Loïc Hoguin
2019-10-02Ensure we can stream the response body from any processLoïc Hoguin
2019-10-02Ensure we can read the request body from any processLoïc Hoguin
2019-10-02Update gun_down messages in test suitesLoïc Hoguin
2019-09-16Fix closing of connection on response_body_too_smallLoïc Hoguin
2019-09-15Split up urlencoded tests to speed up req_SUITELoïc Hoguin
2019-09-15Skip req_SUITE:read_body_mtu on WindowsLoïc Hoguin
On Windows the loopback MTU seems to be set to 0xFFFFFFFF (basically no limit) which makes the test irrelevant.
2019-09-15Increase the period for req_SUITE:read_body_periodLoïc Hoguin
This should increase the likelihood of the test succeeding on slower systems when run over TLS.
2019-09-14Implement backpressure on cowboy_req:stream_bodyLoïc Hoguin
This should limit the amount of memory that Cowboy is using when a handler is sending data much faster than the network. The new max_stream_buffer_size is a soft limit and only has an effect when the cowboy_stream_h handler is used.
2019-09-06Fix tests failing following Gun update to masterLoïc Hoguin
2019-09-06Rename Gun's transport_opts to tls_optsLoïc Hoguin
2018-11-20Increase a test timeout to get rid of intermittent failuresLoïc Hoguin
2018-11-09Add sendfile support to cowboy_req:stream_bodyLoïc Hoguin
It is now possible to stream one or more sendfile tuples. A simple example of what can now be done would be for example to build a tar file on the fly using the sendfile syscall for sending the files, or to support Range requests with more than one range with the sendfile syscall. When using cowboy_compress_h unfortunately we have to read the file in order to send it. More options will be added at a later time to make sure users don't read too much into memory. This is a new feature however so existing code is not affected. Also rework cowboy_http's data sending to be flatter.
2018-09-07Add cowboy_req:read_and_match_urlencoded_body/2,3Loïc Hoguin
2018-06-27Add test cases for cowboy_req:stream_eventsLoïc Hoguin
2018-06-25Add streaming without chunking for HTTP/1.1Eric Meadows-Jönsson
If content-length is set in the response headers we can skip chunked transfer-encoding.
2018-05-17Remove/convert tests about request body from old_http_SUITELoïc Hoguin
2018-05-16Increase a timeout to make some slower tests passLoïc Hoguin
2018-05-16Use default port when not given in :authorityLoïc Hoguin
2017-11-29Add nowarn_export_all to all test suitesLoïc Hoguin
2017-11-20Queue HTTP/2 trailers when there's still data in the bufferLoïc Hoguin
2017-11-20Improve trailers test when no te header is sentLoïc Hoguin
2017-11-19Remove another test from the old http suiteLoïc Hoguin
2017-11-15Add preliminary support for trailers in responsesLoïc Hoguin
This depends on changes in Cowlib that are only available on master.
2017-11-01Fix two edge cases for cowboy_req:stream_bodyLoïc Hoguin
Sending data of size 0 with the fin flag set resulted in nothing being sent to the client and still considering the response to be finished for HTTP/1.1. For both HTTP/1.1 and HTTP/2, the final chunk of body that is sent automatically by Cowboy at the end of a response that the user did not properly terminate was not passing through stream handlers. This resulted in issues like compression being incorrect. Some tests still fail under 20.1.3. They are due to recent zlib changes and should be fixed in a future patch release. Unfortunately it does not seem to be any 20.1 version that is safe to use for Cowboy, although some will work better than others.
2017-10-30Handle expect: 100-continue request headersLoïc Hoguin
The 100 continue response will only be sent if the client has not sent the body yet (at all), if the connection is HTTP/1.1 or above and if the user has not sent it yet. The 100 continue response is sent when the user calls read_body and it is cowboy_stream_h's responsibility to send it. This means projects that don't use the cowboy_stream_h stream handler will need to handle the expect header themselves (but that's okay because they might have different considerations than normal Cowboy).
2017-10-29Add cowboy_req:inform/2,3Loïc Hoguin
User code can now send as many 1xx responses as necessary.
2017-10-25Introduce cowboy_req:sock/1 and cowboy_req:cert/1Loïc Hoguin
To obtain the local socket ip/port and the client TLS certificate, respectively.
2017-10-02Fix infinite loop on incomplete multipart bodyJeffrey Griffin
I have amended a lot of changes from the original commit to make it behave as expected, including returning a 400 error. LH