jiahuili430 commented on a change in pull request #3577:
URL: https://github.com/apache/couchdb/pull/3577#discussion_r640025470



##########
File path: src/chttpd/src/chttpd.erl
##########
@@ -1036,14 +1036,16 @@ error_headers(#httpd{mochi_req=MochiReq}=Req, 401=Code, 
ErrorStr, ReasonStr) ->
             % redirect to the session page.
             case ErrorStr of
             <<"unauthorized">> ->
-                case config:get("couch_httpd_auth", "authentication_redirect", 
undefined) of
+                case chttpd_util:get_chttpd_auth_config(
+                    "authentication_redirect", "/_utils/session.html") of

Review comment:
       In the default.ini file, `authentication_redirect = / 
_utils/session.html`.
   I think `config:get("couch_httpd_auth", "authentication_redirect", 
undefined)` always returns `/_utils/session.html`, that is why I changed it 
here.
   
   Except for "authentication_redirect", "iterations" have different values, 
too.
       default.ini: `iterations = 10`
       previous code: `config:get("couch_httpd_auth", "iterations", "1000")`
   
   Thank you for review, @iilyak




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to