couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1144005 - /couchdb/trunk/src/couchdb/couch_httpd_db.erl
Date Thu, 07 Jul 2011 19:48:39 GMT
Author: jan
Date: Thu Jul  7 19:48:39 2011
New Revision: 1144005

URL: http://svn.apache.org/viewvc?rev=1144005&view=rev
Log:
whitespace: fix indentation to match surrounding code

Modified:
    couchdb/trunk/src/couchdb/couch_httpd_db.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_db.erl?rev=1144005&r1=1144004&r2=1144005&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_db.erl Thu Jul  7 19:48:39 2011
@@ -1284,24 +1284,24 @@ extract_header_rev(Req, ExplicitRev) ->
 
 parse_copy_destination_header(Req) ->
     case couch_httpd:header_value(Req, "Destination") of
-        undefined ->
-            throw({bad_request, "Destination header is mandatory for COPY."});
-        Destination ->
-            case re:run(Destination, "^https?://", [{capture, none}]) of
-                match ->
-                    throw({bad_request, "Destination URL must be relative."});
-                nomatch ->
-                % see if ?rev=revid got appended to the Destination header
-                case re:run(Destination, "\\?", [{capture, none}]) of
-                    nomatch ->
-                        {list_to_binary(Destination), {0, []}};
-                    match ->
-                        [DocId, RevQs] = re:split(Destination, "\\?", [{return, list}]),
-                        [_RevQueryKey, Rev] = re:split(RevQs, "=", [{return, list}]),
-                        {Pos, RevId} = couch_doc:parse_rev(Rev),
-                        {list_to_binary(DocId), {Pos, [RevId]}}
-                end
+    undefined ->
+        throw({bad_request, "Destination header is mandatory for COPY."});
+    Destination ->
+        case re:run(Destination, "^https?://", [{capture, none}]) of
+        match ->
+            throw({bad_request, "Destination URL must be relative."});
+        nomatch ->
+            % see if ?rev=revid got appended to the Destination header
+            case re:run(Destination, "\\?", [{capture, none}]) of
+            nomatch ->
+                {list_to_binary(Destination), {0, []}};
+            match ->
+                [DocId, RevQs] = re:split(Destination, "\\?", [{return, list}]),
+                [_RevQueryKey, Rev] = re:split(RevQs, "=", [{return, list}]),
+                {Pos, RevId} = couch_doc:parse_rev(Rev),
+                {list_to_binary(DocId), {Pos, [RevId]}}
             end
+        end
     end.
 
 validate_attachment_names(Doc) ->



Mime
View raw message