couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [3/27] git commit: fix whitespace
Date Thu, 06 Dec 2012 21:06:54 GMT
fix whitespace


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

Branch: refs/heads/1597-update-erlang-oauth-1-3-0
Commit: 8e888858fb6c6de626961685f6c7b253c60e2edb
Parents: b90e402
Author: Jan Lehnardt <jan@apache.org>
Authored: Wed Dec 5 19:19:19 2012 +0100
Committer: Jan Lehnardt <jan@apache.org>
Committed: Wed Dec 5 23:02:03 2012 +0100

----------------------------------------------------------------------
 etc/couchdb/default.ini.tpl.in    |    2 +-
 src/couchdb/Makefile.am           |    2 +-
 src/couchdb/couch_httpd.erl       |   10 +++++-----
 src/couchdb/couch_httpd_vhost.erl |   30 +++++++++++++++---------------
 4 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e888858/etc/couchdb/default.ini.tpl.in
----------------------------------------------------------------------
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
index 2562123..be92fcf 100644
--- a/etc/couchdb/default.ini.tpl.in
+++ b/etc/couchdb/default.ini.tpl.in
@@ -249,7 +249,7 @@ socket_options = [{keepalive, true}, {nodelay, false}]
 ;cert_file = /full/path/to/server_cert.pem
 ; Path to file containing user's private PEM encoded key.
 ;key_file = /full/path/to/server_key.pem
-; String containing the user's password. Only used if the private keyfile is password protected.

+; String containing the user's password. Only used if the private keyfile is password protected.
 ;password = somepassword
 ; Set to true to validate peer certificates.
 verify_ssl_certificates = false

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e888858/src/couchdb/Makefile.am
----------------------------------------------------------------------
diff --git a/src/couchdb/Makefile.am b/src/couchdb/Makefile.am
index 2b067b4..9fe19bc 100644
--- a/src/couchdb/Makefile.am
+++ b/src/couchdb/Makefile.am
@@ -80,7 +80,7 @@ source_files = \
     couch_work_queue.erl \
     json_stream_parse.erl
 
-EXTRA_DIST = $(source_files) couch_db.hrl couch_js_functions.hrl 
+EXTRA_DIST = $(source_files) couch_db.hrl couch_js_functions.hrl
 
 compiled_files = \
     couch.app \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e888858/src/couchdb/couch_httpd.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 64d1cf1..9ded36d 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -324,11 +324,11 @@ handle_request_int(MochiReq, DefaultFun,
     try
         case couch_httpd_cors:is_preflight_request(HttpReq) of
         #httpd{} ->
-        case authenticate_request(HttpReq, AuthHandlers) of
-        #httpd{} = Req ->
-            HandlerFun(Req);
-        Response ->
-            Response
+            case authenticate_request(HttpReq, AuthHandlers) of
+            #httpd{} = Req ->
+                HandlerFun(Req);
+            Response ->
+                Response
             end;
         Response ->
             Response

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e888858/src/couchdb/couch_httpd_vhost.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd_vhost.erl b/src/couchdb/couch_httpd_vhost.erl
index 96804cb..4c3ebfe 100644
--- a/src/couchdb/couch_httpd_vhost.erl
+++ b/src/couchdb/couch_httpd_vhost.erl
@@ -32,7 +32,7 @@
 %% doc the vhost manager.
 %% This gen_server keep state of vhosts added to the ini and try to
 %% match the Host header (or forwarded) against rules built against
-%% vhost list. 
+%% vhost list.
 %%
 %% Declaration of vhosts take place in the configuration file :
 %%
@@ -51,7 +51,7 @@
 %%      "*.db.example.com = /"  will match all cname on top of db
 %% examples to the root of the machine.
 %%
-%% 
+%%
 %% Rewriting Hosts to path
 %% -----------------------
 %%
@@ -75,7 +75,7 @@
 %%    redirect_vhost_handler = {Module, Fun}
 %%
 %% The function take 2 args : the mochiweb request object and the target
-%%% path. 
+%%% path.
 
 start_link() ->
     gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
@@ -125,14 +125,14 @@ append_path("/"=_Target, "/"=_Path) ->
 append_path(Target, Path) ->
     Target ++ Path.
 
-% default redirect vhost handler 
+% default redirect vhost handler
 redirect_to_vhost(MochiReq, VhostTarget) ->
     Path = MochiReq:get(raw_path),
     Target = append_path(VhostTarget, Path),
 
     ?LOG_DEBUG("Vhost Target: '~p'~n", [Target]),
 
-    Headers = mochiweb_headers:enter("x-couchdb-vhost-path", Path, 
+    Headers = mochiweb_headers:enter("x-couchdb-vhost-path", Path,
         MochiReq:get(headers)),
 
     % build a new mochiweb request
@@ -146,7 +146,7 @@ redirect_to_vhost(MochiReq, VhostTarget) ->
     MochiReq1.
 
 %% if so, then it will not be rewritten, but will run as a normal couchdb request.
-%* normally you'd use this for _uuids _utils and a few of the others you want to 
+%* normally you'd use this for _uuids _utils and a few of the others you want to
 %% keep available on vhosts. You can also use it to make databases 'global'.
 vhost_global( VhostGlobals, MochiReq) ->
     RawUri = MochiReq:get(raw_path),
@@ -167,14 +167,14 @@ try_bind_vhost([], _HostParts, _Port, _PathParts) ->
 try_bind_vhost([VhostSpec|Rest], HostParts, Port, PathParts) ->
     {{VHostParts, VPort, VPath}, Path} = VhostSpec,
     case bind_port(VPort, Port) of
-        ok -> 
+        ok ->
             case bind_vhost(lists:reverse(VHostParts), HostParts, []) of
                 {ok, Bindings, Remainings} ->
                     case bind_path(VPath, PathParts) of
                         {ok, PathParts1} ->
                             Path1 = make_target(Path, Bindings, Remainings, []),
                             {make_path(Path1), make_path(PathParts1)};
-                        fail -> 
+                        fail ->
                             try_bind_vhost(Rest, HostParts, Port,
                                 PathParts)
                     end;
@@ -185,7 +185,7 @@ try_bind_vhost([VhostSpec|Rest], HostParts, Port, PathParts) ->
 
 %% doc: build new patch from bindings. bindings are query args
 %% (+ dynamic query rewritten if needed) and bindings found in
-%% bind_path step. 
+%% bind_path step.
 %% TODO: merge code with rewrite. But we need to make sure we are
 %% in string here.
 make_target([], _Bindings, _Remaining, Acc) ->
@@ -215,7 +215,7 @@ bind_vhost([],[], Bindings) -> {ok, Bindings, []};
 bind_vhost([?MATCH_ALL], [], _Bindings) -> fail;
 bind_vhost([?MATCH_ALL], Rest, Bindings) -> {ok, Bindings, Rest};
 bind_vhost([], _HostParts, _Bindings) -> fail;
-bind_vhost([{bind, Token}|Rest], [Match|RestHost], Bindings) -> 
+bind_vhost([{bind, Token}|Rest], [Match|RestHost], Bindings) ->
     bind_vhost(Rest, RestHost, [{{bind, Token}, Match}|Bindings]);
 bind_vhost([Cname|Rest], [Cname|RestHost], Bindings) ->
     bind_vhost(Rest, RestHost, Bindings);
@@ -272,15 +272,15 @@ parse_vhost(Vhost) ->
             H1 = make_spec(H, []),
             {H1, P, string:tokens(Path, "/")}
     end.
-            
+
 
 split_host_port(HostAsString) ->
     case string:rchr(HostAsString, $:) of
         0 ->
             {split_host(HostAsString), '*'};
         N ->
-            HostPart = string:substr(HostAsString, 1, N-1), 
-            case (catch erlang:list_to_integer(string:substr(HostAsString, 
+            HostPart = string:substr(HostAsString, 1, N-1),
+            case (catch erlang:list_to_integer(string:substr(HostAsString,
                             N+1, length(HostAsString)))) of
                 {'EXIT', _} ->
                     {split_host(HostAsString), '*'};
@@ -308,7 +308,7 @@ make_spec([P|R], Acc) ->
 
 
 parse_var(P) ->
-    case P of 
+    case P of
         ":" ++ Var ->
             {bind, Var};
         _ -> P
@@ -328,7 +328,7 @@ make_path(Parts) ->
 
 init(_) ->
     ok = couch_config:register(fun ?MODULE:config_change/2),
-    
+
     %% load configuration
     {VHostGlobals, VHosts, Fun} = load_conf(),
     State = #vhosts_state{


Mime
View raw message