Switch branches/tags
Nothing to show
Commits on Oct 26, 2013
Commits on Sep 19, 2013
Commits on Aug 27, 2013
  1. Merge pull request #277 from bgfoshay/master

    snej committed Aug 27, 2013
    Replicator now runs in background, using iOS background-task API
Commits on Jul 17, 2013
  1. Implement CouchDB “connection_timeout” replication option

    snej committed Jul 17, 2013
    Value is desired timeout in milliseconds, e.g. 60000 for 1 minute.
    This applies to all HTTP requests sent by the replicator.
    Default is 1 minute.
    Fixes couchbaselabs/touchdb-ios#270
Commits on Jul 15, 2013
  1. Handle HTTP digest auth correctly in TDRemoteRequest

    snej committed Jul 15, 2013
    Fixes #269
Commits on Jun 25, 2013
Commits on Jun 24, 2013
Commits on May 27, 2013
  1. Explicitly set proxy settings for TDSocketChangeTracker.

    snej committed May 27, 2013
    CFStream doesn't automatically look up the system HTTP proxy settings; you have to get those
    settings and then set the stream to use them. :-p
    Fixes #259 (I think — haven't verified this in an environment with a proxy)
Commits on May 26, 2013
Commits on May 20, 2013
  1. Merge pull request #258 from Papercloud/named-document-replication

    snej committed May 20, 2013
    Add support for filtering _changes by doc_ids, to facilitate named document replication
    (There's not yet any public API for this; that will need to come later.)
Commits on Apr 22, 2013
  1. Merge pull request #253 from sensis-sales-tools/jens-master-view-bug-fix

    snej committed Apr 22, 2013
    Router: interpret "+" as space in URL query params
Commits on Apr 18, 2013
  1. Workaround for truncated _changes feed responses

    snej committed Apr 18, 2013
    If TDSocketChangeTracker gets an unparseable response whose beginning
    looks like the expected JSON, assume the socket got cut off by some
    intermediary and go through the usual retry mechanism.
    Fixes #241.
  2. Fix "removePending: sequence %lld not in set" warnings

    snej committed Apr 18, 2013
    Manually copied over from CouchbaseLite commit 8ee5c3d
Commits on Apr 5, 2013
  1. Some correctness tweaks to TDSocketChangeTracker

    snej committed Apr 5, 2013
    A futile attempt to address truncated feeds (#241); but I think these are
    good changes to make anyway even if they didn't help that.
  2. Basic-auth improvements

    snej committed Apr 5, 2013
    * If a TDRemoteRequest gets an auth challenge and finds a new credential based on the Realm string,
      it now remembers that in its authorizer, and the replicator will pick it up and use that as its
      authorizer from then on. This should help pick up credentials registered with non-empty realms.
    * TDRemoteRequest now tries the 'proposed' credential, if there is one, on its first pass through
      the auth challenge handler.
    * Added more logging about the auth flow, for future debugging needs.
    I am not sure if these will fix issue #242 but they should help.
Commits on Mar 29, 2013
  1. Make TDPusher more careful abut bumping the checkpoint

    snej committed Mar 29, 2013
    It now works similarly to the puller, using an NSIndexSet to keep track of which sequences haven't
    yet been uploaded, and only advancing the checkpoint to just before the first sequence in the set.
    This will fix possible edge cases/race conditions where the checkpoint may have been advanced too
    optimistically, causing a doc that failed to be pushed once to never be retried. (Fixes #246)
  2. Make returned error strings more compatible with CouchDB's

    snej committed Mar 29, 2013
    These strings are in JSON "error" properties in error responses and in individual items
    of a _bulk_docs response.
Commits on Mar 28, 2013
  1. Better logging if change tracker fails HTTP auth

    snej committed Mar 28, 2013
    If TDSocketChangeTracker gets a 401 or 407 and can't find a credential, or the credential is rejected,
    it now logs a message of the form
        TDSocketChangeTracker[...]: HTTP auth failed; sent Authorization: %@  ;  got WWW-Authenticate: %@
    showing the Authorization header it sent (if any, else null) and the WWW-Authenticate response header.
    These headers are also returned in the NSError as keys "HTTPAuthorization" and "HTTPAuthenticateHeader"
    (although this is of limited use since this info won't make it all the way up to the public replication API, yet.)
    This should help in diagnosing issue #242.
Commits on Mar 27, 2013
  1. Rename "BrowserID" --> "Persona"

    snej committed Mar 27, 2013
    Note that this invalidates all saved persistent replications that used Persona/BrowserID auth,
    because the property in the replication doc was renamed too.
    It also changes the server endpoint that the replicator hits to log in from /db/browserid to /db/persona.
    (This is equivalent to commit 111859c from CouchbaseLite, although it's not a direct cherry-pick. I had to make the same changes manually because too many things have been renamed for a merge to work.)
Commits on Mar 26, 2013
  1. Fix: Puller would lose checkpoint if first doc couldn't be pulled

    snej committed Mar 26, 2013
    If the first new revision received by the puller fails to be read or
    written, the last-sequence ID won't advance. But the puller was instead
    getting a null sequence ID instead of the checkpointed one, and trying
    to save that, which deleted the checkpoint. So the next pull would start
    over from the beginning.
  2. Fix: "?" in doc ID wasn't being escaped

    snej committed Mar 26, 2013
    TDEscapeID wasn't escaping "?". This led to the replicator constructing
    invalid URLs for docs whose ID contains "?", which meant they'd never get
  3. Fix: Pull checkpoints weren't getting restored correctly

    snej committed Mar 26, 2013
    TDPuller was saving its checkpoints to the remote JSON doc as numbers but
    they were then read back and cast to string, causing the comparison to
    fail. This meant the puller would start over from the beginning every time.
    I also added some more logging.
Commits on Mar 23, 2013
Commits on Mar 18, 2013
Commits on Mar 8, 2013
  1. Push replicator now encodes non-string filter params as JSON.

    snej committed Mar 8, 2013
    I'm not sure whether such parameters are allowed, but JSON encoding seems like the reasonable
    way to send them to the remote _changes feed (as opposed to calling ObjC -description on them,
    which the code used to do...)
    Potential fix for issue #239.
Commits on Feb 26, 2013
  1. Fix for TDMultipartDownloader in case NSURLConnection gets two responses

    snej committed Feb 26, 2013
    It's possible in rare cases for the didReceiveResponse: delegate method to be called twice.
    Handle this correctly by creating a new _reader within that call.
    Thanks to @kjots, @chaisehocking, @drekka for tracking this down!
    Speculatively fixes #236.
Commits on Feb 10, 2013
  1. Don't stop a push replication if the _revs_diff call gets an error

    snej committed Feb 10, 2013
    Took out the -stop call. The remaining call to -revisionFailed will ensure that the
    pull is retried later. And in the case being reported, where the call fails due to being
    canceled when going offline, the replication will continue when it goes back online.
    Fixes #233.
Commits on Feb 5, 2013
  1. Fixed compile errors reported by Xcode 4.6

    snej committed Feb 5, 2013
    Make sure to run "git submodule sync" after pulling this commit.
Commits on Jan 28, 2013
  1. Make sure views compiled from JS get rebuilt if the map/reduce fn cha…

    snej committed Jan 28, 2013
    …Although currently this only takes effect next time the app is launched, i.e.
    it isn't watching for edits of the design docs while running.
    Also moved the code that triggers the compilation out of TDRouter and into
    TD_View and TD_Database.
Commits on Jan 24, 2013
Commits on Jan 23, 2013
  1. Fix crash in TDJSViewCompiler

    snej committed Jan 23, 2013
    The compiled function objects were getting GC'd, after which calling them would crash.