You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2015/09/09 10:42:44 UTC

[01/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Repository: couchdb-mochiweb
Updated Branches:
  refs/heads/upstream b66b68d95 -> bd6ae7cbb


add benchmarking for mochiweb

Add a benchmark-script, and add `make bench` which creates an app
for the benchmark. Additionally add a new route to the sample app
to have a benchmark that is not dependent on the file system.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/f01872e2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/f01872e2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/f01872e2

Branch: refs/heads/upstream
Commit: f01872e2ac30e21a5bb41765fb14f49ec026be1e
Parents: b66b68d
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Mon Jul 20 00:19:12 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Tue Jul 28 20:58:45 2015 +0200

----------------------------------------------------------------------
 Makefile                                        |  6 ++++++
 support/bench.sh                                | 21 ++++++++++++++++++++
 .../mochiwebapp_skel/src/mochiapp_web.erl       |  3 +++
 3 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/f01872e2/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 33601c7..a7914ee 100644
--- a/Makefile
+++ b/Makefile
@@ -21,3 +21,9 @@ clean:
 
 app:
 	@$(REBAR) -r create template=mochiwebapp dest=$(DEST) appid=$(PROJECT)
+
+bench: app
+	@echo "Writing $(DEST)/$(PROJECT).sh"
+	@cp support/bench.sh $(DEST)/bench.sh
+	@perl -p -i -e "s/-s reloader/-s reloader\n    -detached/g" $(DEST)/start-dev.sh
+	@perl -p -i -e "s/-s reloader/-s reloader \\\/g" $(DEST)/start-dev.sh

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/f01872e2/support/bench.sh
----------------------------------------------------------------------
diff --git a/support/bench.sh b/support/bench.sh
new file mode 100755
index 0000000..7af4c69
--- /dev/null
+++ b/support/bench.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+SERVER_IP=""
+
+if test ! -n "$SERVER_IP"; then
+    echo "error: please set SERVER_IP"
+    exit 1
+fi
+
+BENCH_RUN="siege -q -c400 -r100 -b http://$SERVER_IP:8080/hello_world"
+
+sleep 120
+
+echo ""
+echo ""
+for i in `seq 1 10`;
+do
+    echo "Running test #$i:"
+    $BENCH_RUN
+    sleep 90
+done

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/f01872e2/support/templates/mochiwebapp_skel/src/mochiapp_web.erl
----------------------------------------------------------------------
diff --git a/support/templates/mochiwebapp_skel/src/mochiapp_web.erl b/support/templates/mochiwebapp_skel/src/mochiapp_web.erl
index 5fe455a..8429a88 100644
--- a/support/templates/mochiwebapp_skel/src/mochiapp_web.erl
+++ b/support/templates/mochiwebapp_skel/src/mochiapp_web.erl
@@ -26,6 +26,9 @@ loop(Req, DocRoot) ->
         case Req:get(method) of
             Method when Method =:= 'GET'; Method =:= 'HEAD' ->
                 case Path of
+                  "hello_world" ->
+                    Req:respond({200, [{"Content-Type", "text/plain"}],
+                    "Hello world!\n"});
                     _ ->
                         Req:serve_file(Path, DocRoot)
                 end;


[17/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
update changelog for #161


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/82bb026b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/82bb026b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/82bb026b

Branch: refs/heads/upstream
Commit: 82bb026b05217d6f7ed65f23e51cf6811c8cb0cd
Parents: decb075
Author: Bob Ippolito <bo...@redivi.com>
Authored: Tue Sep 8 18:41:47 2015 -0700
Committer: Bob Ippolito <bo...@redivi.com>
Committed: Tue Sep 8 18:41:47 2015 -0700

----------------------------------------------------------------------
 CHANGES.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/82bb026b/CHANGES.md
----------------------------------------------------------------------
diff --git a/CHANGES.md b/CHANGES.md
index b7f6c4b..05bf694 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,9 @@
 Version 2.13.0 released XXXX-XX-XX
 
-* Ensure correct ordering of Set-Cookie headers, first in first out.
+* Avoid swallowing messages that are not related to the socket
+  during request parsing
+  https://github.com/mochi/mochiweb/pull/161
+* Ensure correct ordering of Set-Cookie headers: first in, first out
   https://github.com/mochi/mochiweb/issues/162
 * Improve response times by caching a formatted date once per second
   for the response headers with a mochiweb_clock service


[14/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
ensure correct ordering of Set-Cookie output headers #162


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/952087ef
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/952087ef
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/952087ef

Branch: refs/heads/upstream
Commit: 952087ef7a2ce73b8c2d666de13adf138d913d77
Parents: 419ba96
Author: Bob Ippolito <bo...@redivi.com>
Authored: Mon Aug 31 08:30:40 2015 -0700
Committer: Bob Ippolito <bo...@redivi.com>
Committed: Mon Aug 31 08:30:40 2015 -0700

----------------------------------------------------------------------
 CHANGES.md                  |  2 ++
 src/mochiweb_request.erl    |  8 +++-----
 test/mochiweb_test_util.erl | 10 +++++++++-
 test/mochiweb_test_util.hrl |  2 +-
 test/mochiweb_tests.erl     | 17 +++++++++++++++++
 5 files changed, 32 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/952087ef/CHANGES.md
----------------------------------------------------------------------
diff --git a/CHANGES.md b/CHANGES.md
index 7102a6f..b7f6c4b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,7 @@
 Version 2.13.0 released XXXX-XX-XX
 
+* Ensure correct ordering of Set-Cookie headers, first in first out.
+  https://github.com/mochi/mochiweb/issues/162
 * Improve response times by caching a formatted date once per second
   for the response headers with a mochiweb_clock service
   https://github.com/mochi/mochiweb/pull/158

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/952087ef/src/mochiweb_request.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_request.erl b/src/mochiweb_request.erl
index 093d9ba..39890ce 100644
--- a/src/mochiweb_request.erl
+++ b/src/mochiweb_request.erl
@@ -326,12 +326,10 @@ format_response_header({Code, ResponseHeaders}, {?MODULE, [_Socket, _Opts, _Meth
                      false ->
                          HResponse1
                  end,
-    F = fun ({K, V}, Acc) ->
-                [mochiweb_util:make_io(K), <<": ">>, V, <<"\r\n">> | Acc]
-        end,
-    End = lists:foldl(F, [<<"\r\n">>], mochiweb_headers:to_list(HResponse2)),
+    End = [[mochiweb_util:make_io(K), <<": ">>, V, <<"\r\n">>]
+           || {K, V} <- mochiweb_headers:to_list(HResponse2)],
     Response = mochiweb:new_response({THIS, Code, HResponse2}),
-    {[make_version(Version), make_code(Code), <<"\r\n">> | End], Response};
+    {[make_version(Version), make_code(Code), <<"\r\n">> | [End, <<"\r\n">>]], Response};
 format_response_header({Code, ResponseHeaders, Length},
                        {?MODULE, [_Socket, _Opts, _Method, _RawPath, _Version, _Headers]}=THIS) ->
     HResponse = mochiweb_headers:make(ResponseHeaders),

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/952087ef/test/mochiweb_test_util.erl
----------------------------------------------------------------------
diff --git a/test/mochiweb_test_util.erl b/test/mochiweb_test_util.erl
index 2fbf14f..a0bf11a 100644
--- a/test/mochiweb_test_util.erl
+++ b/test/mochiweb_test_util.erl
@@ -63,7 +63,7 @@ client_request(SockFun, _Method, []) ->
     {the_end, {error, closed}} = {the_end, SockFun(recv)},
     ok;
 client_request(SockFun, Method,
-               [#treq{path=Path, body=Body, xreply=ExReply} | Rest]) ->
+               [#treq{path=Path, body=Body, xreply=ExReply, xheaders=ExHeaders} | Rest]) ->
     Request = [atom_to_list(Method), " ", Path, " HTTP/1.1\r\n",
                client_headers(Body, Rest =:= []),
                "\r\n",
@@ -83,6 +83,14 @@ client_request(SockFun, Method,
     ?assert(mochiweb_headers:get_value("Date", Headers) =/= undefined),
     ?assert(mochiweb_headers:get_value("Content-Type", Headers) =/= undefined),
     ContentLength = list_to_integer(mochiweb_headers:get_value("Content-Length", Headers)),
+    EHeaders = mochiweb_headers:make(ExHeaders),
+    lists:foreach(
+      fun (K) ->
+              ?assertEqual(mochiweb_headers:get_value(K, EHeaders),
+                           mochiweb_headers:get_value(K, Headers))
+      end,
+      %% Assumes implementation details of the headers
+      gb_trees:keys(EHeaders)),
     {payload, ExReply} = {payload, drain_reply(SockFun, ContentLength, <<>>)},
     client_request(SockFun, Method, Rest).
 

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/952087ef/test/mochiweb_test_util.hrl
----------------------------------------------------------------------
diff --git a/test/mochiweb_test_util.hrl b/test/mochiweb_test_util.hrl
index 99fdc4e..503be98 100644
--- a/test/mochiweb_test_util.hrl
+++ b/test/mochiweb_test_util.hrl
@@ -1 +1 @@
--record(treq, {path, body= <<>>, xreply= <<>>}).
+-record(treq, {path, body= <<>>, xreply= <<>>, xheaders= []}).

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/952087ef/test/mochiweb_tests.erl
----------------------------------------------------------------------
diff --git a/test/mochiweb_tests.erl b/test/mochiweb_tests.erl
index 209971b..0b558ac 100644
--- a/test/mochiweb_tests.erl
+++ b/test/mochiweb_tests.erl
@@ -96,6 +96,23 @@ single_GET_any_test_() ->
       ?_assertEqual(ok, with_server(Transport, ServerFun, ClientFun))}
      || Transport <- [ssl, plain]].
 
+
+cookie_header_test() ->
+    ReplyPrefix = "You requested: ",
+    ExHeaders = [{"Set-Cookie", "foo=bar"},
+                 {"Set-Cookie", "foo=baz"}],
+    ServerFun = fun (Req) ->
+                        Reply = ReplyPrefix ++ Req:get(path),
+                        Req:ok({"text/plain", ExHeaders, Reply})
+                end,
+    Path = "cookie_header",
+    ExpectedReply = list_to_binary(ReplyPrefix ++ Path),
+    TestReqs = [#treq{path=Path, xreply=ExpectedReply, xheaders=ExHeaders}],
+    ClientFun = new_client_fun('GET', TestReqs),
+    ok = with_server(plain, ServerFun, ClientFun),
+    ok.
+
+
 do_CONNECT(Transport, Times) ->
     PathPrefix = "example.com:",
     ReplyPrefix = "You requested: ",


[05/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
optimize for read concurrency


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/b7aff437
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/b7aff437
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/b7aff437

Branch: refs/heads/upstream
Commit: b7aff43702abfbee2a8d1503b2204caaf0791f3d
Parents: 8ab7682
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Thu Jul 30 00:36:01 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Thu Jul 30 00:36:01 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_clock.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/b7aff437/src/mochiweb_clock.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_clock.erl b/src/mochiweb_clock.erl
index 8762770..12381a0 100644
--- a/src/mochiweb_clock.erl
+++ b/src/mochiweb_clock.erl
@@ -65,7 +65,7 @@ rfc1123() ->
 
 -spec init([]) -> {ok, #state{}}.
 init([]) ->
-    ?MODULE = ets:new(?MODULE, [named_table, protected]),
+    ?MODULE = ets:new(?MODULE, [named_table, protected, {read_concurrency, true}]),
     handle_info(update_date, #state{}),
     timer:send_interval(1000, update_date),
     {ok, #state{}}.


[08/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
don't stablish link


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/19ba7a33
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/19ba7a33
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/19ba7a33

Branch: refs/heads/upstream
Commit: 19ba7a339bec101b376af26701514eae48c8f2d7
Parents: 5f4901d
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sat Aug 1 23:52:01 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Sun Aug 2 02:15:16 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_clock.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/19ba7a33/src/mochiweb_clock.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_clock.erl b/src/mochiweb_clock.erl
index 10ac4a3..4f101c5 100644
--- a/src/mochiweb_clock.erl
+++ b/src/mochiweb_clock.erl
@@ -46,7 +46,7 @@ start_link() ->
 
 -spec start() -> {ok, pid()}.
 start() ->
-    gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
+    gen_server:start({local, ?MODULE}, ?MODULE, [], []).
 
 -spec stop() -> stopped.
 stop() ->


[02/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
performance: cache date

as the formatting of the date for each request is quite expensive
we cache it in an ets table now.

heavily inspired by cowboy, but does not use binaries and uses
still httpd_util:rfc1183 internally.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/9aad1236
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/9aad1236
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/9aad1236

Branch: refs/heads/upstream
Commit: 9aad123606a5930d44f4ff8a4bdef83b72917571
Parents: b66b68d
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Mon Jul 20 02:46:38 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Tue Jul 28 20:59:19 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_clock.erl   | 101 ++++++++++++++++++++++++++++++++++++++++++
 src/mochiweb_http.erl    |   4 ++
 src/mochiweb_request.erl |   2 +-
 3 files changed, 106 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/9aad1236/src/mochiweb_clock.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_clock.erl b/src/mochiweb_clock.erl
new file mode 100644
index 0000000..3c9f464
--- /dev/null
+++ b/src/mochiweb_clock.erl
@@ -0,0 +1,101 @@
+%% Copyright (c) 2011-2014, Loïc Hoguin <es...@ninenines.eu>
+%% Copyright (c) 2015, Robert Kowalski <ro...@kowalski.gd>
+%%
+%% Permission to use, copy, modify, and/or distribute this software for any
+%% purpose with or without fee is hereby granted, provided that the above
+%% copyright notice and this permission notice appear in all copies.
+%%
+%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+%% While a gen_server process runs in the background to update
+%% the cache of formatted dates every second, all API calls are
+%% local and directly read from the ETS cache table, providing
+%% fast time and date computations.
+
+-module(mochiweb_clock).
+
+-behaviour(gen_server).
+
+%% API.
+-export([start_link/0]).
+-export([start/0]).
+-export([stop/0]).
+-export([rfc1123/0]).
+
+%% gen_server.
+-export([init/1]).
+-export([handle_call/3]).
+-export([handle_cast/2]).
+-export([handle_info/2]).
+-export([terminate/2]).
+-export([code_change/3]).
+
+-record(state, {}).
+
+%% API.
+
+-spec start_link() -> {ok, pid()}.
+start_link() ->
+    gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
+
+-spec start() -> {ok, pid()}.
+start() ->
+    gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
+
+-spec stop() -> stopped.
+stop() ->
+    gen_server:call(?MODULE, stop).
+
+-spec rfc1123() -> string().
+rfc1123() ->
+    case ets:lookup(lala, rfc1123) of
+        [{rfc1123, Date}] ->
+            Date;
+        [] ->
+            <<"">>
+    end.
+
+%% gen_server.
+
+-spec init([]) -> {ok, #state{}}.
+init([]) ->
+    lala = ets:new(lala, [named_table, protected]),
+    handle_info(update_date, #state{}),
+    timer:send_interval(1000, update_date),
+    {ok, #state{}}.
+
+-type from() :: {pid(), term()}.
+-spec handle_call
+    (stop, from(), State) -> {stop, normal, stopped, State}
+    when State::#state{}.
+handle_call(stop, _From, State) ->
+    {stop, normal, stopped, State};
+handle_call(_Request, _From, State) ->
+    {reply, ignored, State}.
+
+-spec handle_cast(_, State) -> {noreply, State} when State::#state{}.
+handle_cast(_Msg, State) ->
+    {noreply, State}.
+
+-spec handle_info(any(), State) -> {noreply, State} when State::#state{}.
+handle_info(update_date, State) ->
+    Date = httpd_util:rfc1123_date(),
+    ets:insert(lala, {rfc1123, Date}),
+    {noreply, State};
+handle_info(_Info, State) ->
+    {noreply, State}.
+
+-spec terminate(_, _) -> ok.
+terminate(_Reason, _State) ->
+    ok.
+
+-spec code_change(_, State, _) -> {ok, State} when State::#state{}.
+code_change(_OldVsn, State, _Extra) ->
+    {ok, State}.
+

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/9aad1236/src/mochiweb_http.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl
index d83fdda..a1e909d 100644
--- a/src/mochiweb_http.erl
+++ b/src/mochiweb_http.erl
@@ -48,9 +48,11 @@ parse_options(Options) ->
     mochilists:set_defaults(?DEFAULTS, Options1).
 
 stop() ->
+    mochiweb_clock:stop(),
     mochiweb_socket_server:stop(?MODULE).
 
 stop(Name) ->
+    mochiweb_clock:stop(),
     mochiweb_socket_server:stop(Name).
 
 %% @spec start(Options) -> ServerRet
@@ -65,9 +67,11 @@ stop(Name) ->
 %%      The proplist is as follows: [{name, Name}, {port, Port}, {active_sockets, ActiveSockets}, {timing, Timing}].
 %% @end
 start(Options) ->
+    {ok, _Pid} = mochiweb_clock:start(),
     mochiweb_socket_server:start(parse_options(Options)).
 
 start_link(Options) ->
+    {ok, _Pid} = mochiweb_clock:start_link(),
     mochiweb_socket_server:start_link(parse_options(Options)).
 
 loop(Socket, Opts, Body) ->

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/9aad1236/src/mochiweb_request.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_request.erl b/src/mochiweb_request.erl
index 99352d2..093d9ba 100644
--- a/src/mochiweb_request.erl
+++ b/src/mochiweb_request.erl
@@ -691,7 +691,7 @@ maybe_serve_file(File, ExtraHeaders, {?MODULE, [_Socket, _Opts, _Method, _RawPat
 
 server_headers() ->
     [{"Server", "MochiWeb/1.0 (" ++ ?QUIP ++ ")"},
-     {"Date", httpd_util:rfc1123_date()}].
+     {"Date", mochiweb_clock:rfc1123()}].
 
 make_code(X) when is_integer(X) ->
     [integer_to_list(X), [" " | httpd_util:reason_phrase(X)]];


[19/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
move bench.sh to the template instead


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/bd6ae7cb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/bd6ae7cb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/bd6ae7cb

Branch: refs/heads/upstream
Commit: bd6ae7cbb371666a1f68115056f7b30d13765782
Parents: 5ab8949
Author: Bob Ippolito <bo...@redivi.com>
Authored: Tue Sep 8 21:24:59 2015 -0700
Committer: Bob Ippolito <bo...@redivi.com>
Committed: Tue Sep 8 21:24:59 2015 -0700

----------------------------------------------------------------------
 Makefile                                    |  5 +----
 support/bench.sh                            | 21 ---------------------
 support/templates/mochiwebapp.template      |  2 ++
 support/templates/mochiwebapp_skel/bench.sh | 19 +++++++++++++++++++
 4 files changed, 22 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/bd6ae7cb/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 7205dcf..983c304 100644
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,5 @@ clean:
 	@$(REBAR) clean
 
 app:
+	@[ -z "$(PROJECT)" ] && echo "ERROR: required variable PROJECT missing" 1>&2 && exit 1 || true
 	@$(REBAR) -r create template=mochiwebapp dest=$(DEST) appid=$(PROJECT)
-
-bench: app
-	@echo "Writing $(DEST)/$(PROJECT).sh"
-	@cp support/bench.sh $(DEST)/bench.sh

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/bd6ae7cb/support/bench.sh
----------------------------------------------------------------------
diff --git a/support/bench.sh b/support/bench.sh
deleted file mode 100755
index 7af4c69..0000000
--- a/support/bench.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-SERVER_IP=""
-
-if test ! -n "$SERVER_IP"; then
-    echo "error: please set SERVER_IP"
-    exit 1
-fi
-
-BENCH_RUN="siege -q -c400 -r100 -b http://$SERVER_IP:8080/hello_world"
-
-sleep 120
-
-echo ""
-echo ""
-for i in `seq 1 10`;
-do
-    echo "Running test #$i:"
-    $BENCH_RUN
-    sleep 90
-done

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/bd6ae7cb/support/templates/mochiwebapp.template
----------------------------------------------------------------------
diff --git a/support/templates/mochiwebapp.template b/support/templates/mochiwebapp.template
index 4942609..c56314c 100644
--- a/support/templates/mochiwebapp.template
+++ b/support/templates/mochiwebapp.template
@@ -13,6 +13,7 @@
 {template, "mochiwebapp_skel/src/mochiapp_sup.erl", "{{dest}}/src/{{appid}}_sup.erl"}.
 {template, "mochiwebapp_skel/src/mochiapp_web.erl", "{{dest}}/src/{{appid}}_web.erl"}.
 {template, "mochiwebapp_skel/start-dev.sh", "{{dest}}/start-dev.sh"}.
+{template, "mochiwebapp_skel/bench.sh", "{{dest}}/bench.sh"}.
 {template, "mochiwebapp_skel/priv/www/index.html", "{{dest}}/priv/www/index.html"}.
 {file, "../../.gitignore", "{{dest}}/.gitignore"}.
 {file, "../../Makefile", "{{dest}}/Makefile"}.
@@ -20,3 +21,4 @@
 {file, "../../rebar", "{{dest}}/rebar"}.
 {chmod, 8#755, "{{dest}}/rebar"}.
 {chmod, 8#755, "{{dest}}/start-dev.sh"}.
+{chmod, 8#755, "{{dest}}/bench.sh"}.

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/bd6ae7cb/support/templates/mochiwebapp_skel/bench.sh
----------------------------------------------------------------------
diff --git a/support/templates/mochiwebapp_skel/bench.sh b/support/templates/mochiwebapp_skel/bench.sh
new file mode 100755
index 0000000..eb6e9c9
--- /dev/null
+++ b/support/templates/mochiwebapp_skel/bench.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# workaround for rebar mustache template bug
+DEFAULT_PORT={{port}}
+HOST=${HOST:-127.0.0.1}
+PORT=${PORT:-${DEFAULT_PORT}}
+
+BENCH_RUN="siege -q -c400 -r100 -b http://$HOST:$PORT/hello_world"
+
+sleep 120
+
+echo ""
+echo ""
+for i in `seq 1 10`;
+do
+    echo "Running test #$i:"
+    $BENCH_RUN
+    sleep 90
+done


[06/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
return string


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/5c48f09d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/5c48f09d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/5c48f09d

Branch: refs/heads/upstream
Commit: 5c48f09d722da846312eb322a5c8eadb90c2ac07
Parents: b7aff43
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Thu Jul 30 00:50:12 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Thu Jul 30 00:50:12 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_clock.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/5c48f09d/src/mochiweb_clock.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_clock.erl b/src/mochiweb_clock.erl
index 12381a0..10ac4a3 100644
--- a/src/mochiweb_clock.erl
+++ b/src/mochiweb_clock.erl
@@ -58,7 +58,7 @@ rfc1123() ->
         [{rfc1123, Date}] ->
             Date;
         [] ->
-            <<"">>
+            ""
     end.
 
 %% gen_server.


[09/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
do not stop clock on http stop


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/4daa6f3d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/4daa6f3d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/4daa6f3d

Branch: refs/heads/upstream
Commit: 4daa6f3dda213b794a860bfe9640716221d909f2
Parents: 19ba7a3
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Tue Aug 4 22:01:43 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Tue Aug 4 22:01:47 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_http.erl | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/4daa6f3d/src/mochiweb_http.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl
index a10c117..450085f 100644
--- a/src/mochiweb_http.erl
+++ b/src/mochiweb_http.erl
@@ -48,11 +48,9 @@ parse_options(Options) ->
     mochilists:set_defaults(?DEFAULTS, Options1).
 
 stop() ->
-    mochiweb_clock:stop(),
     mochiweb_socket_server:stop(?MODULE).
 
 stop(Name) ->
-    mochiweb_clock:stop(),
     mochiweb_socket_server:stop(Name).
 
 %% @spec start(Options) -> ServerRet


[18/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
Merge pull request #159 from robertkowalski/bench-mochi

add benchmarking for mochiweb

Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/5ab89490
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/5ab89490
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/5ab89490

Branch: refs/heads/upstream
Commit: 5ab8949004229f2f9cb902d5d72ee1b32ca83a15
Parents: 82bb026 5238b76
Author: Bob Ippolito <bo...@redivi.com>
Authored: Tue Sep 8 18:42:49 2015 -0700
Committer: Bob Ippolito <bo...@redivi.com>
Committed: Tue Sep 8 18:42:49 2015 -0700

----------------------------------------------------------------------
 Makefile                                        |  4 ++++
 support/bench.sh                                | 21 ++++++++++++++++++++
 .../mochiwebapp_skel/src/mochiapp_web.erl       |  3 +++
 3 files changed, 28 insertions(+)
----------------------------------------------------------------------



[03/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
remove wrong name from debugging


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/8ab76825
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/8ab76825
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/8ab76825

Branch: refs/heads/upstream
Commit: 8ab76825e61a665de45d36681eeab04dea428a39
Parents: 9aad123
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Tue Jul 28 22:32:58 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Tue Jul 28 22:36:59 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_clock.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/8ab76825/src/mochiweb_clock.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_clock.erl b/src/mochiweb_clock.erl
index 3c9f464..8762770 100644
--- a/src/mochiweb_clock.erl
+++ b/src/mochiweb_clock.erl
@@ -54,7 +54,7 @@ stop() ->
 
 -spec rfc1123() -> string().
 rfc1123() ->
-    case ets:lookup(lala, rfc1123) of
+    case ets:lookup(?MODULE, rfc1123) of
         [{rfc1123, Date}] ->
             Date;
         [] ->
@@ -65,7 +65,7 @@ rfc1123() ->
 
 -spec init([]) -> {ok, #state{}}.
 init([]) ->
-    lala = ets:new(lala, [named_table, protected]),
+    ?MODULE = ets:new(?MODULE, [named_table, protected]),
     handle_info(update_date, #state{}),
     timer:send_interval(1000, update_date),
     {ok, #state{}}.
@@ -86,7 +86,7 @@ handle_cast(_Msg, State) ->
 -spec handle_info(any(), State) -> {noreply, State} when State::#state{}.
 handle_info(update_date, State) ->
     Date = httpd_util:rfc1123_date(),
-    ets:insert(lala, {rfc1123, Date}),
+    ets:insert(?MODULE, {rfc1123, Date}),
     {noreply, State};
 handle_info(_Info, State) ->
     {noreply, State}.


[16/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
Merge pull request #161 from cloudant/leave-other-messages

Don't swallow 'other' messages

Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/decb0754
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/decb0754
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/decb0754

Branch: refs/heads/upstream
Commit: decb0754a0d97eeb1fc03247261197dcbf0e6781
Parents: 952087e 61a65fe
Author: Bob Ippolito <bo...@redivi.com>
Authored: Tue Sep 8 18:40:26 2015 -0700
Committer: Bob Ippolito <bo...@redivi.com>
Committed: Tue Sep 8 18:40:26 2015 -0700

----------------------------------------------------------------------
 src/mochiweb_http.erl | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[07/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
apply feedback on starting the clock


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/5f4901d3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/5f4901d3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/5f4901d3

Branch: refs/heads/upstream
Commit: 5f4901d331214b3c875e93cf22abff71868708ec
Parents: 5c48f09
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Thu Jul 30 00:59:35 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Thu Jul 30 01:07:59 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_http.erl | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/5f4901d3/src/mochiweb_http.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl
index a1e909d..a10c117 100644
--- a/src/mochiweb_http.erl
+++ b/src/mochiweb_http.erl
@@ -67,13 +67,21 @@ stop(Name) ->
 %%      The proplist is as follows: [{name, Name}, {port, Port}, {active_sockets, ActiveSockets}, {timing, Timing}].
 %% @end
 start(Options) ->
-    {ok, _Pid} = mochiweb_clock:start(),
+    ok = ensure_started(mochiweb_clock),
     mochiweb_socket_server:start(parse_options(Options)).
 
 start_link(Options) ->
-    {ok, _Pid} = mochiweb_clock:start_link(),
+    ok = ensure_started(mochiweb_clock),
     mochiweb_socket_server:start_link(parse_options(Options)).
 
+ensure_started(M) ->
+    case erlang:apply(M, start, []) of
+        {ok, _Pid} ->
+            ok;
+        {error, {already_started, _PID}} ->
+            ok
+    end.
+
 loop(Socket, Opts, Body) ->
     ok = mochiweb_socket:exit_if_closed(mochiweb_socket:setopts(Socket, [{packet, http}])),
     request(Socket, Opts, Body).


[10/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
remove apply call


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/8f5e13b1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/8f5e13b1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/8f5e13b1

Branch: refs/heads/upstream
Commit: 8f5e13b188d1cb6c8e56340dcf70185c86039c98
Parents: 4daa6f3
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Tue Aug 4 22:02:12 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Tue Aug 4 22:02:12 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_http.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/8f5e13b1/src/mochiweb_http.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl
index 450085f..1354fa6 100644
--- a/src/mochiweb_http.erl
+++ b/src/mochiweb_http.erl
@@ -73,7 +73,7 @@ start_link(Options) ->
     mochiweb_socket_server:start_link(parse_options(Options)).
 
 ensure_started(M) ->
-    case erlang:apply(M, start, []) of
+    case M:start() of
         {ok, _Pid} ->
             ok;
         {error, {already_started, _PID}} ->


[11/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
_PID -> _Pid


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/3d284c03
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/3d284c03
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/3d284c03

Branch: refs/heads/upstream
Commit: 3d284c0303a23675fbd0fb7173bb0a017f2d124f
Parents: 8f5e13b
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Tue Aug 4 22:28:26 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Tue Aug 4 22:28:26 2015 +0200

----------------------------------------------------------------------
 src/mochiweb_http.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/3d284c03/src/mochiweb_http.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl
index 1354fa6..a9290a2 100644
--- a/src/mochiweb_http.erl
+++ b/src/mochiweb_http.erl
@@ -76,7 +76,7 @@ ensure_started(M) ->
     case M:start() of
         {ok, _Pid} ->
             ok;
-        {error, {already_started, _PID}} ->
+        {error, {already_started, _Pid}} ->
             ok
     end.
 


[12/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
Merge pull request #158 from robertkowalski/simplify

performance: cache date

Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/88d7eedf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/88d7eedf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/88d7eedf

Branch: refs/heads/upstream
Commit: 88d7eedf10d7b4ebb31a50cdbf004d5c840b585d
Parents: b66b68d 3d284c0
Author: Bob Ippolito <bo...@redivi.com>
Authored: Sun Aug 30 18:04:57 2015 -0700
Committer: Bob Ippolito <bo...@redivi.com>
Committed: Sun Aug 30 18:04:57 2015 -0700

----------------------------------------------------------------------
 src/mochiweb_clock.erl   | 101 ++++++++++++++++++++++++++++++++++++++++++
 src/mochiweb_http.erl    |  10 +++++
 src/mochiweb_request.erl |   2 +-
 3 files changed, 112 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[15/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
Don't swallow 'other' messages

Mochiweb handlers that use the message queue can sometimes find that
mochiweb has swallowed messages, causing them to timeout or block for
a reply that will never come.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/61a65fea
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/61a65fea
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/61a65fea

Branch: refs/heads/upstream
Commit: 61a65fea7d6b1e9f93c4a2c6b96e96dee02bec6e
Parents: 952087e
Author: Robert Newson <rn...@apache.org>
Authored: Tue Sep 8 10:39:48 2015 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Sep 8 10:42:27 2015 +0100

----------------------------------------------------------------------
 src/mochiweb_http.erl | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/61a65fea/src/mochiweb_http.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl
index a9290a2..568019f 100644
--- a/src/mochiweb_http.erl
+++ b/src/mochiweb_http.erl
@@ -99,9 +99,7 @@ request(Socket, Opts, Body) ->
             exit(normal);
         {ssl_closed, _} ->
             mochiweb_socket:close(Socket),
-            exit(normal);
-        Other ->
-            handle_invalid_msg_request(Other, Socket, Opts)
+            exit(normal)
     after ?REQUEST_RECV_TIMEOUT ->
         mochiweb_socket:close(Socket),
         exit(normal)
@@ -129,7 +127,7 @@ headers(Socket, Opts, Request, Headers, Body, HeaderCount) ->
         {tcp_closed, _} ->
             mochiweb_socket:close(Socket),
             exit(normal);
-        Other ->
+        {tcp_error, _, emsgsize} = Other ->
             handle_invalid_msg_request(Other, Socket, Opts, Request, Headers)
     after ?HEADERS_RECV_TIMEOUT ->
         mochiweb_socket:close(Socket),
@@ -143,10 +141,6 @@ call_body({M, F}, Req) ->
 call_body(Body, Req) ->
     Body(Req).
 
--spec handle_invalid_msg_request(term(), term(), term()) -> no_return().
-handle_invalid_msg_request(Msg, Socket, Opts) ->
-    handle_invalid_msg_request(Msg, Socket, Opts, {'GET', {abs_path, "/"}, {0,9}}, []).
-
 -spec handle_invalid_msg_request(term(), term(), term(), term(), term()) -> no_return().
 handle_invalid_msg_request(Msg, Socket, Opts, Request, RevHeaders) ->
     case {Msg, r15b_workaround()} of


[13/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
update CHANGELOG for #158


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/419ba968
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/419ba968
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/419ba968

Branch: refs/heads/upstream
Commit: 419ba968e22ebb69ad542add426034fd5cbd4f74
Parents: 88d7eed
Author: Bob Ippolito <bo...@redivi.com>
Authored: Sun Aug 30 22:55:14 2015 -0700
Committer: Bob Ippolito <bo...@redivi.com>
Committed: Sun Aug 30 22:55:14 2015 -0700

----------------------------------------------------------------------
 CHANGES.md           | 6 ++++++
 src/mochiweb.app.src | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/419ba968/CHANGES.md
----------------------------------------------------------------------
diff --git a/CHANGES.md b/CHANGES.md
index 88846b0..7102a6f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,9 @@
+Version 2.13.0 released XXXX-XX-XX
+
+* Improve response times by caching a formatted date once per second
+  for the response headers with a mochiweb_clock service
+  https://github.com/mochi/mochiweb/pull/158
+
 Version 2.12.2 released 2015-02-21
 
 * Close connections quietly when setopts fails with a closed socket.

http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/419ba968/src/mochiweb.app.src
----------------------------------------------------------------------
diff --git a/src/mochiweb.app.src b/src/mochiweb.app.src
index 7431224..dd049af 100644
--- a/src/mochiweb.app.src
+++ b/src/mochiweb.app.src
@@ -1,7 +1,7 @@
 %% This is generated from src/mochiweb.app.src
 {application, mochiweb,
  [{description, "MochiMedia Web Server"},
-  {vsn, "2.12.2"},
+  {vsn, "2.13.0"},
   {modules, []},
   {registered, []},
   {env, []},


[04/19] mochiweb commit: updated refs/heads/upstream to bd6ae7c

Posted by rn...@apache.org.
remove detached

not needed


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/5238b76f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/5238b76f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/5238b76f

Branch: refs/heads/upstream
Commit: 5238b76f115ceb4f85757afe37bd42484989957c
Parents: f01872e
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Tue Jul 28 22:40:22 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Tue Jul 28 22:40:22 2015 +0200

----------------------------------------------------------------------
 Makefile | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/5238b76f/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index a7914ee..7205dcf 100644
--- a/Makefile
+++ b/Makefile
@@ -25,5 +25,3 @@ app:
 bench: app
 	@echo "Writing $(DEST)/$(PROJECT).sh"
 	@cp support/bench.sh $(DEST)/bench.sh
-	@perl -p -i -e "s/-s reloader/-s reloader\n    -detached/g" $(DEST)/start-dev.sh
-	@perl -p -i -e "s/-s reloader/-s reloader \\\/g" $(DEST)/start-dev.sh