aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-11-12Use my new ci.erlang.mk pluginLoïc Hoguin
Instead of tracking Erlang/OTP versions manually in each project, I can just say OTP-19+ and let the plugin fill in the most recent patch releases for each version. In addition I will configure the CI commands to cleanup unneeded versions automatically.
2017-11-10Keep the state returned by the tracer callbackLoïc Hoguin
It was mistakenly discarded.
2017-11-09Add a changelog for cowboy_restLoïc Hoguin
2017-11-09Fix the introduction version for the new 2.1 functionsLoïc Hoguin
2017-11-09Add missing changes for 2.1 release2.1.0Loïc Hoguin
2017-11-08Update Cowboy to 2.1.0Loïc Hoguin
Also add OTP-20.1.4 to CI.
2017-11-03Add a terminate event to the tracer and more testsLoïc Hoguin
2017-11-01Fix stream_handler_SUITE test failuresLoïc Hoguin
2017-11-01Don't crash when cowboy_clock is not runningLoïc Hoguin
This can happen normally when Cowboy is restarted, for example. Instead of failing requests when that happens, we degrade gracefully and do a little more work to provide the current date header.
2017-11-01Add {switch_handler, Module} return value to cowboy_restLoïc Hoguin
Also {switch_handler, Module, Opts}. Allows switching to a different handler type. This is particularly useful for processing most of the request with cowboy_rest and then streaming the response body using cowboy_loop.
2017-11-01Update Cowlib to 2.0.1 and fix OTP 20.1+ Websocket compressionLoïc Hoguin
Unfortunately compression will be disabled for 20.1, 20.1.1 and 20.1.2. In additiona I do not recommend 20.1.3 due to issues inflating some specific sizes.
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-31Fix another warningLoïc Hoguin
2017-10-31Add some todosLoïc Hoguin
2017-10-31Fix a unused warningLoïc Hoguin
2017-10-31Fix broken tests in loop_handler_SUITELoïc Hoguin
2017-10-31Fix the static_handler test suiteLoïc Hoguin
Bad requests correctly return 400, not 500.
2017-10-31Add informational responses to metricsLoïc Hoguin
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-27Add cowboy_tracer_h stream handlerLoïc Hoguin
Another experimental stream handler. It enables tracing for the connection process and any children processes based on the matching of the request. It can be used to do ad-hoc tracing by sending a specific header, path, method or other. It is meant to be used both for tests and production. Some configuration scenarios are NOT safe for production, beware. It's important to understand that, at this time, tracing is enabled on the scale of the entire connection including any future request processes. Keep this in mind when trying to use it in production. The only way to stop tracing is by having the callback function exit (by calling exit/1 explicitly). This can be done after a certain number of events for example. Tracing can generate a lot of events, so it's a good idea to stop after a small number of events (between 1000 and 10000 should be good) and to avoid tracing the whole world. Documentation will follow at a later time.
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-23Add migration note concerning multiple headersLuke Bakken
2017-10-23Fix a bug in HTTP/2 where connection gets closed prematurelyLoïc Hoguin
When the user code was sending a response fully without reading the request body, the connection could get closed when receiving DATA frames for that body. We now ask the client to stop sending data via a NO_ERROR RST_STREAM, and linger any stream that has been reset so that we can skip any pending frames from that stream. This fixes a number of intermittent failures in req_SUITE, which now passes reliably. In addition a small number of rfc7540_SUITE test cases have been corrected as they were incorrect.
2017-10-22Add a metrics test for switching to WebsocketLoïc Hoguin
2017-10-22Ensure stream terminate is called when switching protocolsLoïc Hoguin
2017-10-21Add a test for stream_reply metricsLoïc Hoguin
2017-10-21Fix sending of final chunk in HTTP/1.1Loïc Hoguin
I broke this when fixing stream handlers earlier.
2017-10-21Add a test for early_error metricsLoïc Hoguin
2017-10-21Add a metrics test when the handler didn't send anythingLoïc Hoguin
Also fix a test group to use h2 instead of HTTP/1.1.
2017-10-21Fix stream handler state being discarded on terminateLoïc Hoguin
When we have to send a response before terminating a stream, we call info. The state returned by this info call was discarded when we called terminate after that. This commit fixes it. There are no tests for this, however the new metrics test in the next commit requires the correct behavior so this is ultimately covered.
2017-10-20Add a test for metrics with a request bodyLoïc Hoguin
2017-10-20Add experimental metrics stream handlerLoïc Hoguin
It collects metrics and passes them to a configurable callback once the stream terminates. It will be documented in a future release. More tests incoming.
2017-10-20Fix HTTP/1.1 stopping streams too earlyLoïc Hoguin
It is possible in some cases to move on to the next request without waiting, but that can be done as an optimization later on if necessary.
2017-10-20Make the getting started use 2.0.0Loïc Hoguin
2017-10-13Add OTP-20.1.2 to CILoïc Hoguin
2017-10-13Small guide fixesLoïc Hoguin
2017-10-03Make a few link use https2.0.0Loïc Hoguin
2017-10-03Update version, CI and Cowlib dependency versionLoïc Hoguin
Hello 2.0.0!
2017-10-03Make sure a path parsing error in the router gives a 400Loïc Hoguin
2017-10-02Document cow_ws:frame in Cowboy for nowLoïc Hoguin
2017-10-02Fix cowboy:set_env when the env value is missingLoïc Hoguin
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
2017-10-02Fix the documentation for the command flowLoïc Hoguin
2017-09-27Clarify a multipart exampleLoïc Hoguin
2017-09-27Cowboy 2.0.0-rc.42.0.0-rc.4Loïc Hoguin
2017-09-27Fix error response when constraint validation failsLoïc Hoguin
2017-09-27Add OTP-20.1 to CILoïc Hoguin
2017-09-27Ensure the behavior on stream handler crash is consistentLoïc Hoguin
Also corrects the lack of error response when HTTP/1.1 is used.
2017-09-25Cleanup various commentsLoïc Hoguin