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 13:51:34 UTC

[couchdb-nano] branch issue#274 created (now c7870d6)

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.


      at c7870d6  use selective attribute copy instead of clone to avoid circular references - fixes issue #274

This branch includes the following new commits:

     new c7870d6  use selective attribute copy instead of clone to avoid circular references - fixes issue #274

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.


[couchdb-nano] 01/01: use selective attribute copy instead of clone to avoid circular references - fixes issue #274

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 c7870d63b5b494cadb0e16f2f995b7ae67373627
Author: Glynn Bird <gl...@apache.org>
AuthorDate: Thu Aug 26 14:51:20 2021 +0100

    use selective attribute copy instead of clone to avoid circular references - fixes issue #274
---
 lib/nano.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/nano.js b/lib/nano.js
index 5a4ee28..a2edb96 100644
--- a/lib/nano.js
+++ b/lib/nano.js
@@ -381,7 +381,11 @@ module.exports = exports = function dbScope (cfg) {
     }
 
     // scrub and log
-    const scrubbedReq = JSON.parse(JSON.stringify(req))
+    const scrubbedReq = {
+      method: req.method,
+      headers: req.headers,
+      url: req.url
+    }
     scrubRequest(scrubbedReq, true)
     log(scrubbedReq)