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 2014/08/01 11:05:38 UTC

[02/49] chttpd commit: updated refs/heads/windsor-merge to 554ef74

Fix cancel by replication_id

BugzID: 17969


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

Branch: refs/heads/windsor-merge
Commit: ce262eedc429fe6d5fba6a6382e227895754899d
Parents: 43a2e96
Author: Robert Newson <ro...@cloudant.com>
Authored: Sun Mar 10 21:35:32 2013 -0500
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Jul 29 17:10:36 2014 +0100

----------------------------------------------------------------------
 src/chttpd.erl | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/ce262eed/src/chttpd.erl
----------------------------------------------------------------------
diff --git a/src/chttpd.erl b/src/chttpd.erl
index c9247c9..136a0a0 100644
--- a/src/chttpd.erl
+++ b/src/chttpd.erl
@@ -289,12 +289,17 @@ check_request_uri_length(Uri, MaxUriLen) when is_list(MaxUriLen) ->
     end.
 
 fix_uri(Req, Props, Type) ->
-    case is_http(replication_uri(Type, Props)) of
-    true ->
+    case replication_uri(Type, Props) of
+    undefined ->
         Props;
-    false ->
-        Uri = make_uri(Req,replication_uri(Type, Props)),
-        [{Type,Uri}|proplists:delete(Type,Props)]
+    Uri0 ->
+        case is_http(Uri0) of
+        true ->
+            Props;
+        false ->
+            Uri = make_uri(Req,replication_uri(Type, Props)),
+            [{Type,Uri}|proplists:delete(Type,Props)]
+        end
     end.
 
 replication_uri(Type, PostProps) ->