You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by gl...@apache.org on 2021/08/26 14:01:20 UTC

[couchdb-nano] branch issue#274 updated (c7870d6 -> 00d9f08)

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

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


    from c7870d6  use selective attribute copy instead of clone to avoid circular references - fixes issue #274
     add 4e1ca07  Update nano.js (#270)
     new 00d9f08  ensure headers is cloned

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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

[couchdb-nano] 01/01: ensure headers is cloned

Posted by gl...@apache.org.
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 <gl...@apache.org>
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)