aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-02-02Added absoluteURI supportDavid Kelly
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.
2012-02-02Apply a trick to the erlang:hibernate calls to suppress dialyzer warningsLoïc Hoguin
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.
2012-02-01Fix a typo that prevented protocol options upgradesLoïc Hoguin
2012-01-31Merge branch 'remove-queue-len-call' of https://github.com/puzza007/cowboyLoïc Hoguin
2012-01-31Remove call to queue:len/1Paul Oliver
queue:len/1 is O(len(Q)) queue:out/1 is O(1) amortized, O(len(Q)) worst case Replace with a pattern match
2012-01-31Removing travis-ci from the cowboy development toolkitLoïc Hoguin
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.
2012-01-31Merge branch 'autobahn-suite' of https://github.com/klaar/cowboyLoïc Hoguin
This needs python2 to be the default python in /usr/bin/python.
2012-01-31Use queue() for managing wait queues in cowboy_listenerLoïc Hoguin
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.
2012-01-31Refactor cowboy_listener for more consistencyLoïc Hoguin
2012-01-31Pass --no_native option to dialyzer to improve dialyzing timesLoïc Hoguin
Goes from 36s to 24s on my laptop.
2012-01-31Add cowboy:get_protocol_options/1 and cowboy_set_protocol_options/2Loïc Hoguin
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.
2012-01-30Move max_connections check directly inside cowboy_listenerLoïc Hoguin
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.
2012-01-26Remove a leftover ct:printLoïc Hoguin
2012-01-26Merge branch 'rest_delete_no_call' of https://github.com/bfrog/cowboyLoïc Hoguin
2012-01-26Handle delete better when no delete_resource function is implementedTom Burdick
2012-01-25Add Autobahn test suite for websocketsMagnus Klaar
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.
2012-01-23Fix a case where request body wouldn't get cleaned up on keepaliveLoïc Hoguin
The body was still in the buffer that's being used for the next request and was thus used as a request, causing errors.
2012-01-23Merge branch 'master' of https://github.com/bfrog/cowboyLoïc Hoguin
2012-01-23added test for posting to a rest controller where forbidden returns true on ↵Tom Burdick
a keep alive socket
2012-01-23Remove http_resp_body/0, inline it directly in the record definitionLoïc Hoguin
2012-01-23Rename the type http_status/0 to cowboy_http:status/0Loïc Hoguin
2012-01-23Remove http_cookies/0, inline it directly in the record definitionLoïc Hoguin
2012-01-23Rename the type http_header/0 to cowboy_http:header/0Loïc Hoguin
At the same time rename http_headers/0 to cowboy_http:headers/0.
2012-01-23Rename the type http_version/0 to cowboy_http:version/0Loïc Hoguin
2012-01-23Rename the type http_uri/0 to cowboy_http:uri/0Loïc Hoguin
2012-01-23Rename the type http_method/0 to cowboy_http:method/0Loïc Hoguin
Exported types are much better than include files.
2012-01-23Fix typespecs for calendar:datetime/0 in cowboy_http_staticLoïc Hoguin
2012-01-23Add {halt, Req, State} return value to most REST callbacksLoïc Hoguin
Excluding generate_etag, last_modified, expires and variances.
2012-01-23Rename a lot of HandlerState2 variables to HandlerStateLoïc Hoguin
2012-01-23Improve the return value for cowboy_http_rest:upgrade/4Loïc Hoguin
2012-01-23Improve the listener name in the READMELoïc Hoguin
2012-01-23Merge branch 'multipart' of https://github.com/nox/cowboyLoïc Hoguin
Conflicts: src/cowboy_http_req.erl test/http_SUITE.erl
2012-01-23Add multipart supportAnthony Ramine
2012-01-12Welcome to new developments with 0.5.0Loïc Hoguin
2012-01-09Update version to 0.4.00.4.0Loïc Hoguin
2012-01-09Make REST handlers' put_resource accept true or false return valuesLoïc Hoguin
Followup to 0bb23f2400ed0b65834913c8522a978d986f1f92. As discussed in #119.
2012-01-09Merge branch 'static-etag-hook' of https://github.com/klaar/cowboyLoïc Hoguin
2012-01-09Add HTTP handler loops to the READMELoïc Hoguin
2012-01-07Add etag option to cowboy_http_static handler.Magnus Klaar
2012-01-06Update AUTHORSLoïc Hoguin
2012-01-06Update CHANGELOGLoïc Hoguin
2012-01-06Make REST handlers' process_post accept true or false return valuesLoïc Hoguin
They should return true when it has been processed successfully, or false otherwise, in which case a 500 error is sent. Fixes #119.
2012-01-06Fix the stream_body_set_resp testLoïc Hoguin
It was failing from time to time due to the response being sent as two separate packets.
2012-01-06Fix handler crashes handlingLoïc Hoguin
We try to send a 500 error only if we didn't send the response headers yet. If they were, then we have no way to be sure the response was fully sent, nor should we assume anything about how this will be handled client-side, so we do nothing more and in both cases close the connection.
2012-01-06Move the ensure_response call before ensure_body_processedLoïc Hoguin
We want to reply as soon as possible.
2012-01-06Merge branch 'issue-114-tests' of https://github.com/klaar/cowboy into ↵Loïc Hoguin
gracefully-handle-crashes Conflicts: test/http_SUITE.erl
2012-01-05Merge branch 'static-updates' of https://github.com/klaar/cowboyLoïc Hoguin
2012-01-05only run end_static_dir for http and httpsMagnus Klaar
2012-01-05Add test and doc for content types function.Magnus Klaar
2012-01-05Merge branch 'inet_parse_address_fix' of https://github.com/spawngrid/cowboyLoïc Hoguin