Permalink
Switch branches/tags
Nothing to show
Commits on Feb 2, 2012
  1. Added absoluteURI support

    David Kelly Loïc Hoguin
    David Kelly authored and Loïc Hoguin committed Feb 1, 2012
    If requests go through a proxy, they will have the original uri in the
    request, i.e. : GET http://proxy.server.uri/some/query/string  HTTP 1.1 ...
    
    That was problematic -- cowboy_http_protocol:request didn't know what to
    to with the result of decode_packet applied to this, which would be something
    like:
    
    ``` erlang
    {http_request,'GET',{absoluteURI,http,<<"proxy.server.uri">>,
    	undefined,<<"/some/query/string">>},{1,1}}
    ```
    
    So, I just ignore the host, grab the path and pass into
    
    ``` erlang
    cowboy_http_protocol:request({http_request, Method, {abs_path, Path},
    	Version}, State)
    ```
    
    Seems to do the trick without much effort.
  2. Apply a trick to the erlang:hibernate calls to suppress dialyzer warn…

    Loïc Hoguin
    Loïc Hoguin committed Feb 2, 2012
    …ings
    
    Initially recommended by Magnus Klaar, the trick is to add a catch
    instruction before the erlang:hibernate/3 call so that Dialyzer
    thinks it will return, followed by the expected return value
    ('ok' for HTTP, 'closed' for websockets).
    
    This should be good enough until a real solution is found.
Commits on Feb 1, 2012
  1. Fix a typo that prevented protocol options upgrades

    Loïc Hoguin
    Loïc Hoguin committed Feb 1, 2012
Commits on Jan 31, 2012
  1. Remove call to queue:len/1

    puzza007 committed Jan 31, 2012
    queue:len/1 is O(len(Q))
    queue:out/1 is O(1) amortized, O(len(Q)) worst case
    
    Replace with a pattern match
  2. Removing travis-ci from the cowboy development toolkit

    Loïc Hoguin
    Loïc Hoguin committed Jan 31, 2012
    We've been having many recurring issues, some which were fixed,
    only to have other things broken again. Can't rely on a service
    that breaks all the time.
  3. Merge branch 'autobahn-suite' of https://github.com/klaar/cowboy

    Loïc Hoguin
    Loïc Hoguin committed Jan 31, 2012
    This needs python2 to be the default python in /usr/bin/python.
  4. Use queue() for managing wait queues in cowboy_listener

    Loïc Hoguin
    Loïc Hoguin committed Jan 31, 2012
    The previous solution was retrieving the last put connection
    and wasn't a real queue, so this solution should improve the
    overall latency under load.
  5. Refactor cowboy_listener for more consistency

    Loïc Hoguin
    Loïc Hoguin committed Jan 31, 2012
  6. Pass --no_native option to dialyzer to improve dialyzing times

    Loïc Hoguin
    Loïc Hoguin committed Jan 31, 2012
    Goes from 36s to 24s on my laptop.
  7. Add cowboy:get_protocol_options/1 and cowboy_set_protocol_options/2

    Loïc Hoguin
    Loïc Hoguin committed Jan 30, 2012
    This allows any application to upgrade the protocol options without
    having to restart the listener. This is most useful to update the
    dispatch list of HTTP servers, for example.
    
    The upgrade is done at the acceptor level, meaning only new connections
    receive the new protocol options.
Commits on Jan 30, 2012
  1. Move max_connections check directly inside cowboy_listener

    Loïc Hoguin
    Loïc Hoguin committed Jan 30, 2012
    This is a big change in the internal cowboy API. This should not
    have any impact on existing applications as only the acceptor is
    expected to use these API calls.
    
    The function cowboy_listener:wait/3 has been removed. max_connections
    checking now occurs directly in cowboy_listener:add_connection/3.
    If the pool is full and the acceptor has to wait, then it doesn't
    return, waiting for a free space to be available.
    
    To accomodate these changes, it is now cowboy_listener that will
    inform the new connection that it is ready by sending {shoot, self()}.
    This should be a great improvement to the latency of responses as
    there is one less message to wait for before the request process
    can do its work.
    
    Overall the performance under heavy load should also be improved as
    we greatly reduce the number of messages sent between the acceptor
    and the listener process.
Commits on Jan 26, 2012
  1. Remove a leftover ct:print

    Loïc Hoguin
    Loïc Hoguin committed Jan 26, 2012
  2. Handle delete better when no delete_resource function is implemented

    bfrog authored and Loïc Hoguin committed Jan 23, 2012
Commits on Jan 25, 2012
  1. Add Autobahn test suite for websockets

    Magnus Klaar Magnus Klaar
    Magnus Klaar authored and Magnus Klaar committed Dec 23, 2011
    We're using the existing test suite for websocket servers from the
    Autobahn project to verify that out websockets implementation is
    sane. A CT test suite and python module wrapping the test suite has
    been added. The test suite is run when the 'make inttests' target
    is executed.
Commits on Jan 23, 2012
  1. Fix a case where request body wouldn't get cleaned up on keepalive

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
    The body was still in the buffer that's being used for the next
    request and was thus used as a request, causing errors.
  2. Merge branch 'master' of https://github.com/bfrog/cowboy

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
  3. added test for posting to a rest controller where forbidden returns t…

    bfrog committed Jan 23, 2012
    …rue on a keep alive socket
  4. Rename the type http_status/0 to cowboy_http:status/0

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
  5. Rename the type http_header/0 to cowboy_http:header/0

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
    At the same time rename http_headers/0 to cowboy_http:headers/0.
  6. Rename the type http_version/0 to cowboy_http:version/0

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
  7. Rename the type http_uri/0 to cowboy_http:uri/0

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
  8. Rename the type http_method/0 to cowboy_http:method/0

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
    Exported types are much better than include files.
  9. Add {halt, Req, State} return value to most REST callbacks

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
    Excluding generate_etag, last_modified, expires and variances.
  10. Rename a lot of HandlerState2 variables to HandlerState

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
  11. Improve the return value for cowboy_http_rest:upgrade/4

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
  12. Improve the listener name in the README

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
  13. Merge branch 'multipart' of https://github.com/nox/cowboy

    Loïc Hoguin
    Loïc Hoguin committed Jan 23, 2012
    Conflicts:
    	src/cowboy_http_req.erl
    	test/http_SUITE.erl
  14. Add multipart support

    nox authored and Loïc Hoguin committed Nov 7, 2011
Commits on Jan 12, 2012
  1. Welcome to new developments with 0.5.0

    Loïc Hoguin
    Loïc Hoguin committed Jan 12, 2012
Commits on Jan 9, 2012
  1. Update version to 0.4.0

    Loïc Hoguin
    Loïc Hoguin committed Jan 9, 2012