Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't double-encode changes sequence strings in the replicator
Previously we always encoded the sequence as json. In case of a strings, the most common case, this ended up with something like `"\"1-gA..\""`. Then, the endpoints would strip out and ignore the extra `"`. So, avoid sending the extra bytes just so they can be striped out in the end anyway. This should make the logs look a bit cleaner too. Integers or any other sequences are still json-encoded. Integers will still look like `?since=123` and, in the unlikely we case we replicate with a BigCouch 0.4 era endpoint, the `[SeqNum, OpaqueString]` should be properly encoded as before and replications should work. This also fixes a minor annoyance when the `_scheduler/{jobs,docs}` results returning the default start sequence as `0` (an integer) even though in the majority of case they'd almost always turn into a string. After this we consistently return a string as it would be passed in the `_changes?since=...` parameter.
- Loading branch information