aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2014-04-17Merge branch 'fix/basic-auth-empty-password' of git://github.com/soundrop/cowboyLoïc Hoguin
2014-03-27Update cowlib to 0.6.1Loïc Hoguin
2014-03-27Add +warn_missing_spec and fix specsLoïc Hoguin
2014-03-26Remove outdated comments, all edoc, plus a few minor tweaksLoïc Hoguin
2014-03-25Make the latin1 cyrillic route tests work on R17+Loïc Hoguin
Instead of relying on the encoding of the file we now simply have list of numbers as they would be inside a latin1 file.
2014-03-25Don't flush the resp_sent message if connection is closedLoïc Hoguin
Tiny optimization.
2014-03-24Remove cowboy_client; use gun for the HTTP test suiteLoïc Hoguin
2014-03-24Use the new chunked and identity transfer decoding code from cowlibLoïc Hoguin
2014-03-24Use cow_http_hd:parse_transfer_encoding/1 where applicableLoïc Hoguin
2014-03-24Use cow_http_hd:parse_content_length/1 where applicableLoïc Hoguin
2014-03-24Use cow_http_hd:parse_connection/1 where applicableLoïc Hoguin
2014-03-10Remove cowboy_http:urldecode/1 and urlencode/1Loïc Hoguin
Use cow_qs:urldecode/1 and cow_qs:urlencode/1 instead
2014-03-08Fix typespecs of cowboy_websocket:handler_terminateLoïc Hoguin
Pointed out during the ConcuError tutorial by Kostis. Thanks! :-)
2014-02-27Keep the whitespace from multiline headersLoïc Hoguin
Before, we could have Header: the value is multiline Become "the valueis multiline". Now it will properly be "the value is multiline".
2014-02-16Fix stop_listener/1 specSina Samavati
2014-02-09Allow empty passwords when parsing Basic authorization headerAli Sabil
2014-02-06Update copyright yearsLoïc Hoguin
2014-02-06Use the INLINE_LOWERCASE macro in the request parsing codeLoïc Hoguin
Since I made it for similar code in cowlib, let's use it here too.
2014-02-06Add and document the new multipart codeLoïc Hoguin
The old undocumented API is removed entirely. While a documentation exists for the new API, it will not be considered set in stone until further testing has been performed, and a file upload example has been added. The new API should be a little more efficient than the old API, especially with smaller messages.
2013-12-28Fix typespecs for cowboy_req:binding/{2,3} and :bindings/1Loïc Hoguin
2013-12-02Merge branch 'fix/keepalive_loop_stream_recv' of ↵Loïc Hoguin
git://github.com/fishcakez/cowboy
2013-11-26Fix tohexu/1 and tohexl/1Matthias Endler
tohexu(16) or tohexl(16) will now crash, instead of evaluating to $G or $g.
2013-11-18Fix loop handler keepalive race conditionJames Fish
Previously if a loop handler received the timeout message from a previous request on the same connection the socket would be set to {active, once} incorrectly - when a socket packet was already in the message queue. This second packet would not be added to the buffer before a Handler:info/3 call if a user message was in the message queue before both socket packets.
2013-11-14Update Cowboy to 0.9.00.9.0Loïc Hoguin
2013-11-14Add documentation for cowboy_spdyLoïc Hoguin
2013-11-09Properly send 201 on PUT requests when resource didn't existLoïc Hoguin
Regardless of whether a location header has been set, as explained in the HTTP RFC.
2013-11-09Remove an unnecessary clause in cowboy_req:body/2Loïc Hoguin
2013-11-09Use try/catch instead of catchLoïc Hoguin
Thanks Richard Carlsson for the remainder.
2013-11-08Merge branch 'dsucher-better-routes-without-start-slash-error'Loïc Hoguin
2013-11-08Clarify error msg for route lacking starting slashDanielle Sucher
2013-11-08Add a workaround to disable chunked transfer-encodingAdrian Roe
This is an undocumented workaround to disable chunks when using HTTP/1.1. It can be used when the client advertises itself as HTTP/1.1 despite not understanding the chunked transfer-encoding. Usage can be found looking at the test for it. When activated, Cowboy will still advertise itself as HTTP/1.1, but will send the body the same way it would if it was HTTP/1.0.
2013-11-08Optimize query string parsingLoïc Hoguin
* Parsing code was moved to cowlib: cowboy_qs:parse_qs/1 * A function was added to build query strings: cowboy_qs:qs/1 * Also added cowboy_qs:urlencode/1 and cowboy_qsurldecode/1
2013-11-02Review, improve and document the static files handlerLoïc Hoguin
Changes include: * Much simplified route configuration. * Etag generation is now enabled by default. * Web mimetypes are now detected by default. A bigger list of mimetypes can be detected without any additional library. * Mimetypes can no longer be specified as a list. Copying this list for new connections is too costy. You can easily convert it into a function and pass that function to the handler instead. * You can however specify a single hardcoded mimetype. Mostly useful when serving a single file, like an index.html file, to avoid extra operations. * Specifying a path as a list of tokens is not possible anymore. Use either a binary or a string. * Using a private directory will not work if the application was not started properly. Cowboy will not attempt to find the location of this directory if the VM doesn't know it, as this caused issues in some setups. * Overall the code has been much simplified and clarified, and of course has now been documented.
2013-10-23Move cookie parsing/building code to cowlibLoïc Hoguin
The code for parsing has also been rewritten to be more efficient and to be able to handle cookie values with space inside them properly. Update cowlib to 0.2.0.
2013-09-07Implement recv timeout for SPDYLoïc Hoguin
2013-09-04Make cowlib a proper dependencyLoïc Hoguin
Start moving a few functions from Cowboy into cowlib.
2013-09-04More SPDY code readability improvementsLoïc Hoguin
2013-09-04Fix a badmatch issue when calling which_children on SPDY processLoïc Hoguin
2013-09-04Simplify the SPDY code by adding child management functionsLoïc Hoguin
2013-09-02Fix specs for SPDYLoïc Hoguin
2013-09-02Merge branch 'ipv6-literal' of git://github.com/yamt/cowboyLoïc Hoguin
2013-09-02Add request body support for SPDYLoïc Hoguin
And various other improvements following the addition of two tests. New dependency cowlib that will gradually receive most of the parse code from SPDY but also HTTP and its headers.
2013-09-03make cowboy_client:request() allow to override Host headerYAMAMOTO Takashi
this will be used by tests
2013-09-03add unit test for cowboy_protocol:parse_host/1YAMAMOTO Takashi
2013-09-03cowboy_protocol: accept host using ipv6 literalYAMAMOTO Takashi
2013-08-27Merge branch 'fix-ws-atom-responses' of git://github.com/seriyps/cowboyLoïc Hoguin
2013-08-27Merge branch 'websocket-compressed-metadata' of git://github.com/irccloud/cowboyLoïc Hoguin
2013-08-24Crash on failure, don't report errorsLoïc Hoguin
When something went wrong in a handler we used to report errors and then terminate the process normally. This doesn't work so well with links which won't detect failure. Now we still catch the error, but throw another one with more details on why it happened, including the Req object information and the stacktrace. Ranch will then print an error message with all this information. Because we crash directly, this also means that we will not hog resources unnecessarily for too long when something bad happens.
2013-08-24Simpler code for sending errors following crashesLoïc Hoguin
2013-08-15add websocket_compress metadataRJ