aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_client.erl
AgeCommit message (Collapse)Author
2013-09-03make cowboy_client:request() allow to override Host headerYAMAMOTO Takashi
this will be used by tests
2013-05-16Move cowboy_http:version() to cowboy:http_version()Loïc Hoguin
2013-05-16Make the HTTP version type more practicalLoïc Hoguin
Now instead of {1, 1} we have 'HTTP/1.1', and instead of {1, 0} we have 'HTTP/1.0'. This is more efficient, easier to read in crash logs, and clearer in the code.
2013-01-04Hello 2013Loïc Hoguin
2012-08-27Switch to Ranch for connection handlingLoïc Hoguin
This is the first of many API incompatible changes. You have been warned.
2012-05-04Add an 'onresponse' hookLoïc Hoguin
This new protocol option is a fun. It expects 3 args: the Status code used in the reply (this is the cowboy_http:status() type, it can be an integer or a binary), the headers that will be sent in the reply, and the Req. It should only return a possibly modified Req. This can be used for many things like error logging or custom error pages. If a reply is sent inside the hook, then Cowboy will discard the reply initially sent. Extra caution must be used in the handlers making use of inline chunked replies as they will throw an error. This fun cannot be used as a filter, you can either observe the reply sent or discard it to send a different one instead. The hook will not be called for replies sent from inside the hook.
2012-04-29Fix and rework the HTTP test suiteLoïc Hoguin
Use a proper HTTP client to run all tests. This client is currently undocumented and should not be used. Includes a few fixes: * Fix a bug in the max_keepalive test * Fix a bug with max_keepalive handling * Fix a bug in stream_body/1 where data was lost under some conditions The tests now run quite faster than before. All the tests now run twice: once for TCP, once for SSL.