This is an automated email from the ASF dual-hosted git repository.

glynnbird pushed a commit to branch issue#274
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git

commit 00d9f08612622b917100a90511ec05f3f9005b8d
Merge: c7870d6 4e1ca07
Author: Glynn Bird <[email protected]>
AuthorDate: Thu Aug 26 15:01:12 2021 +0100

    ensure headers is cloned

 lib/nano.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --cc lib/nano.js
index a2edb96,f065022..a9a81c4
--- a/lib/nano.js
+++ b/lib/nano.js
@@@ -381,11 -381,8 +381,11 @@@ module.exports = exports = function dbS
      }
  
      // scrub and log
 -    delete req.agent // Agent contains circular refs that does not works well 
with JSON.stringify
 -    const scrubbedReq = JSON.parse(JSON.stringify(req))
 +    const scrubbedReq = {
 +      method: req.method,
-       headers: req.headers,
++      headers: JSON.parse(JSON.stringify(req.headers)),
 +      url: req.url
 +    }
      scrubRequest(scrubbedReq, true)
      log(scrubbedReq)
  

Reply via email to