<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -131,13 +131,13 @@ get_user(Db, UserName) -&gt;
 
 ensure_users_view_exists(Db, DDocId, VName) -&gt; 
     try couch_httpd_db:couch_doc_open(Db, DDocId, nil, []) of
-        Foo -&gt; ok
+        _Foo -&gt; ok
     catch 
         _:Error -&gt; 
             ?LOG_ERROR(&quot;create the design document ~p : ~p&quot;, [DDocId, Error]),
             % create the design document
             {ok, AuthDesign} = auth_design_doc(DDocId, VName),
-            {ok, Rev} = couch_db:update_doc(Db, AuthDesign, []),
+            {ok, _Rev} = couch_db:update_doc(Db, AuthDesign, []),
             ?LOG_ERROR(&quot;created the design document&quot;, []),
             ok
     end.
@@ -180,7 +180,8 @@ cookie_auth_user(#httpd{mochi_req=MochiReq}=Req, DbName) -&gt;
                         FullSecret = &lt;&lt;Secret/binary, UserSalt/binary&gt;&gt;,
                         ExpectedHash = crypto:sha_mac(FullSecret, User ++ &quot;:&quot; ++ TimeStr),
                         Hash = ?l2b(string:join(HashParts, &quot;:&quot;)),
-                        Timeout = 600,
+                        Timeout = to_int(couch_config:get(&quot;couch_httpd_auth&quot;, &quot;timeout&quot;, 600)),
+                        ?LOG_DEBUG(&quot;timeout ~p&quot;, [Timeout]),
                         case (catch list_to_integer(TimeStr, 16)) of
                             TimeStamp when CurrentTime &lt; TimeStamp + Timeout 
                             andalso ExpectedHash == Hash -&gt;
@@ -305,6 +306,11 @@ handle_session_req(Req) -&gt;
     send_method_not_allowed(Req, &quot;GET,HEAD,POST,DELETE&quot;).
 
 
+to_int(Value) when is_list(Value) -&gt;
+    list_to_integer(Value);
+to_int(Value) when is_integer(Value) -&gt;
+    Value.
+
 % % Login handler
 % handle_login_req(#httpd{method='POST'}=Req) -&gt;
 %     DbName = couch_config:get(&quot;couch_httpd_auth&quot;, &quot;authentication_db&quot;),</diff>
      <filename>src/couchdb/couch_httpd_auth.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b7b942a78273f2175a3555cc22c156e2ff1b633b</id>
    </parent>
    <parent>
      <id>a3b98c33b6ddb440c812ea82e2049fb518db7a09</id>
    </parent>
  </parents>
  <author>
    <name>Jason Davies</name>
    <email>jason@jdd.local</email>
  </author>
  <url>http://github.com/jasondavies/couchdb/commit/c79f20993c5840b5f0df51108cc210adf05f2b77</url>
  <id>c79f20993c5840b5f0df51108cc210adf05f2b77</id>
  <committed-date>2009-07-11T11:24:11-07:00</committed-date>
  <authored-date>2009-07-11T11:24:11-07:00</authored-date>
  <message>Merge branch 'jd-cookie-auth' of git://github.com/benoitc/couchdb into cookie-auth</message>
  <tree>9a668cd8d82f316e09a367b5c25845dbd1b00058</tree>
  <committer>
    <name>Jason Davies</name>
    <email>jason@jdd.local</email>
  </committer>
</commit>
