nickva commented on a change in pull request #1176: Implement pluggable 
authentication and session support for replicator
URL: https://github.com/apache/couchdb/pull/1176#discussion_r169185117
 
 

 ##########
 File path: src/couch_replicator/src/couch_replicator_utils.erl
 ##########
 @@ -174,3 +175,93 @@ filter_state(State, States, Info) ->
         false ->
             skip
     end.
+
+
+remove_basic_auth_from_headers(Headers) ->
+    Headers1 = mochiweb_headers:make(Headers),
+    case mochiweb_headers:get_value("Authorization", Headers1) of
+        undefined ->
+            {{undefined, undefined}, Headers};
+        Auth when length(Auth) =< 6 ->
 
 Review comment:
   Good point! Let's use `splitwith/2`.
   
   As for other auth, in this case the function only deals with stripping out 
basic auth credentials so they don't get sent to endpoints, so it's specific to 
basic.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to