You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2020/08/20 16:06:13 UTC

[couchdb] branch handle-jiffy-iolist-reponse-in-atts-since created (now 151e901)

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

vatamane pushed a change to branch handle-jiffy-iolist-reponse-in-atts-since
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 151e901  Handle jiffy returning an iolist when encoding atts_since query string

This branch includes the following new commits:

     new 151e901  Handle jiffy returning an iolist when encoding atts_since query string

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] 01/01: Handle jiffy returning an iolist when encoding atts_since query string

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch handle-jiffy-iolist-reponse-in-atts-since
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 151e9012240d1201d7938c8bc443dce923d8213b
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Thu Aug 20 11:57:56 2020 -0400

    Handle jiffy returning an iolist when encoding atts_since query string
    
    If we don't handle it, it thows an error when trying to encode the full URL
    string, for example:
    
    ```
    badarg,[
     {mochiweb_util,quote_plus,2,[{file,"src/mochiweb_util.erl"},{line,192}]},
     {couch_replicator_httpc,query_args_to_string,2,[{file,"src/couch_replicator_httpc.erl"},{line,421}]},
     {couch_replicator_httpc,full_url,2,[{file,"src/couch_replicator_httpc.erl"},{line,413}]},
     {couch_replicator_api_wrap,open_doc_revs,6,[{file,"src/couch_replicator_api_wrap.erl"},{line,255}]}
    ]
    ```
    
    This is also similar to what we did for open_revs encoding: https://github.com/apache/couchdb/commit/a2d0c4290dde2015e5fb6184696fec3f89c81a4b
---
 src/couch_replicator/src/couch_replicator_api_wrap.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/couch_replicator/src/couch_replicator_api_wrap.erl b/src/couch_replicator/src/couch_replicator_api_wrap.erl
index a21de42..8dc7f2f 100644
--- a/src/couch_replicator/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator/src/couch_replicator_api_wrap.erl
@@ -546,7 +546,7 @@ options_to_query_args(HttpDb, Path, Options0) ->
             length("GET " ++ FullUrl ++ " HTTP/1.1\r\n") +
             length("&atts_since=") + 6,  % +6 = % encoded [ and ]
             PAs, MaxLen, []),
-        [{"atts_since", ?JSON_ENCODE(RevList)} | QueryArgs1]
+        [{"atts_since", ?b2l(iolist_to_binary(?JSON_ENCODE(RevList)))} | QueryArgs1]
     end.