Browse Source

Small updates to the ROADMAP and doc comments

Loïc Hoguin 13 years ago
parent
commit
8363e8995a
3 changed files with 4 additions and 41 deletions
  1. 2 38
      ROADMAP.md
  2. 0 1
      src/cowboy.erl
  3. 2 2
      test/http_SUITE.erl

+ 2 - 38
ROADMAP.md

@@ -61,56 +61,20 @@ are not ordered.
     Tools like curl expect a 100 Continue before sending a
     Tools like curl expect a 100 Continue before sending a
     request body by default.
     request body by default.
 
 
-*   Content-Encoding support.
-
-    Cowboy should be able to send encoded content automatically.
-    The default should be to encode, but the developer must be
-    able to override this default either for the whole listener
-    or just for a single reply.
-
-*   Improve body reading API.
-
-    We want to have various different things for reading the
-    body. First, there should be raw functions for the different
-    ways to read the body: basic, transfer encoded, multipart.
-    Each should allow us to limit the size of what is read.
-
-    On top of these functions there should be two more
-    advanced functions: one would return the result of parsing
-    a x-www-form-urlencoded body; the other would parse a
-    multipart request, save files from the multipart data to
-    a temporary location and return a proplist of values if any
-    along with the files details. This behavior is similar to
-    what is done automatically by PHP with its $_FILES array.
-
-    The advanced functions are of course here for convenience
-    only and it should be trivial to reimplement them directly
-    in a Cowboy application if needed.
+*   Convert the multipart code to stream_body.
 
 
 *   Complete the work on Websockets.
 *   Complete the work on Websockets.
 
 
     Now that the Autobahn test suite is available (make inttests),
     Now that the Autobahn test suite is available (make inttests),
     we have a definite way to know whether Cowboy's implementation
     we have a definite way to know whether Cowboy's implementation
     of Websockets is right. The work can thus be completed. The
     of Websockets is right. The work can thus be completed. The
-    remaining tasks are proper UTF8 handling and fragmentation.
+    remaining tasks are proper UTF8 handling.
 
 
 *   SPDY support.
 *   SPDY support.
 
 
     While SPDY probably won't be added directly to Cowboy, work
     While SPDY probably won't be added directly to Cowboy, work
     has been started on making Cowboy use SPDY.
     has been started on making Cowboy use SPDY.
 
 
-*   Hooks.
-
-    Customizable hooks would allow the developer to extend Cowboy
-    easily. Two kinds of hooks are needed: before dispatching the
-    request, and before sending a reply.
-
-    The first would allow us to apply site-wide functions like
-    authentication or request logging and modify the Req if needed.
-
-    The second is more interesting for response logging or to
-    filter the replies, for example to send custom error pages.
-
 *   Transport upgrades.
 *   Transport upgrades.
 
 
     Some protocols allow an upgrade from TCP to SSL without
     Some protocols allow an upgrade from TCP to SSL without

+ 0 - 1
src/cowboy.erl

@@ -51,7 +51,6 @@ start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts)
 		Transport, TransOpts, Protocol, ProtoOpts)).
 		Transport, TransOpts, Protocol, ProtoOpts)).
 
 
 %% @doc Stop a listener identified by <em>Ref</em>.
 %% @doc Stop a listener identified by <em>Ref</em>.
-%% @todo Currently request processes aren't terminated with the listener.
 -spec stop_listener(any()) -> ok | {error, not_found}.
 -spec stop_listener(any()) -> ok | {error, not_found}.
 stop_listener(Ref) ->
 stop_listener(Ref) ->
 	case supervisor:terminate_child(cowboy_sup, {cowboy_listener_sup, Ref}) of
 	case supervisor:terminate_child(cowboy_sup, {cowboy_listener_sup, Ref}) of

+ 2 - 2
test/http_SUITE.erl

@@ -134,7 +134,7 @@ init_per_group(http, Config) ->
 	Port = 33080,
 	Port = 33080,
 	Transport = cowboy_tcp_transport,
 	Transport = cowboy_tcp_transport,
 	Config1 = init_static_dir(Config),
 	Config1 = init_static_dir(Config),
-	cowboy:start_listener(http, 100,
+	{ok, _} = cowboy:start_listener(http, 100,
 		Transport, [{port, Port}],
 		Transport, [{port, Port}],
 		cowboy_http_protocol, [
 		cowboy_http_protocol, [
 			{dispatch, init_dispatch(Config1)},
 			{dispatch, init_dispatch(Config1)},
@@ -156,7 +156,7 @@ init_per_group(https, Config) ->
 	application:start(crypto),
 	application:start(crypto),
 	application:start(public_key),
 	application:start(public_key),
 	application:start(ssl),
 	application:start(ssl),
-	{ok,_} = cowboy:start_listener(https, 100,
+	{ok, _} = cowboy:start_listener(https, 100,
 		Transport, Opts ++ [{port, Port}],
 		Transport, Opts ++ [{port, Port}],
 		cowboy_http_protocol, [
 		cowboy_http_protocol, [
 			{dispatch, init_dispatch(Config1)},
 			{dispatch, init_dispatch(Config1)},