Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on May 14, 2012
Commits on May 13, 2012
  1. @snej

    Proper SSL hostname checking in TDSocketChangeTracker

    snej authored
    For some reason SecureTransport doesn't do wildcard matching of hostnames in SSL certs (e.g. "*.iriscouch.com") so in the prior commit I had to turn off hostname matching. But that's unsafe.
    
    So in this commit I enable matching by doing the work myself. After the connection opens, read the common-name out of the server's cert and compare it against the intended hostname, obeying wildcards.
    
    I had to bring in some source files from my MYCrypto library that do X.509 cert parsing, since iOS doesn't have SecCertificateCopyCommonName.
  2. @snej

    Improvements to _changes feed auth handling

    snej authored
    * Use username/password baked into the URL, if present.
    * On HTTP error, set .error property to true error, not just "unparseable response".
Commits on May 11, 2012
  1. @snej

    Add Apple-approved workaround for iOS 5 TLS 1.2 compatibility issue

    snej authored
    Disable TLS 1.2 in TDSocketChangeTracker because some servers are incompatible with it.
    Fixes #75.
  2. @snej

    SSL support for TDSocketChangeTracker

    snej authored
    To enable pull replication over SSL. Fixes #75.
    NOTE: Temporarily disabled peer name verification because it's not working right with wildcard subdomain certs such as iriscouch uses.
    Added unit tests.
  3. @snej

    Authorization support for pull replication

    snej authored
    TDSocketChangeTracker wasn't getting any Authorization header value to put in the request.
    Added API to TDPuller, and made it look up the credential from the default credential store.
    If a username/password has been added for this domain in the Keychain, it'll be used.
    
    This partly takes care of #58, although it doesn't include lenkawell's proposed support
    for using a username/password baked into the URL. I'll add that later.
Commits on May 9, 2012
  1. @snej
  2. @snej

    Cleanup from the GNUstep merge

    snej authored
  3. @snej

    Merge remote-tracking branch 'refs/remotes/origin/master'

    snej authored
    (Yeah, I already did this, but for some reason it wasn't recorded as a merge!)
    
    Conflicts:
    	Source/ChangeTracker/TDChangeTracker.m
    	Source/ChangeTracker/TDSocketChangeTracker.m
    	Source/TDBody.m
    	Source/TDCanonicalJSON.m
    	Source/TDCollateJSON.m
    	Source/TDDatabase+Attachments.h
    	Source/TDDatabase+Insertion.m
    	Source/TDDatabase+LocalDocs.m
    	Source/TDDatabase.h
    	Source/TDDatabase.m
    	Source/TDDatabaseManager.m
    	Source/TDJSON.m
    	Source/TDMisc.m
    	Source/TDMultipartDocumentReader.h
    	Source/TDMultipartDocumentReader.m
    	Source/TDPusher.m
    	Source/TDRemoteRequest.m
    	Source/TDReplicatorManager.h
    	Source/TDReplicator_Tests.m
    	Source/TDRouter+Handlers.m
    	Source/TDRouter.h
    	Source/TDRouter.m
    	Source/TDRouter_Tests.m
    	Source/TDServer.m
    	Source/TDURLProtocol.m
    	Source/TDView.m
    	TouchDB.xcodeproj/project.pbxproj
Commits on May 8, 2012
  1. @snej

    More GNUstep fixes

    snej authored
    Implement NSOperationQueue category method.
  2. @snej

    Updated README.

    snej authored
  3. @snej

    Merge remote-tracking branch 'origin/master'

    snej authored
    Conflicts:
    	Source/ChangeTracker/TDChangeTracker.m
    	Source/ChangeTracker/TDSocketChangeTracker.m
    	Source/TDBody.m
    	Source/TDCollateJSON.m
    	Source/TDDatabase+Attachments.h
    	Source/TDDatabase+Insertion.m
    	Source/TDDatabase+LocalDocs.m
    	Source/TDDatabase.m
    	Source/TDJSON.h
    	Source/TDJSON.m
    	Source/TDMisc.m
    	Source/TDMultipartDownloader.m
    	Source/TDPuller.m
    	Source/TDPusher.m
    	Source/TDRemoteRequest.m
    	Source/TDReplicatorManager.h
    	Source/TDReplicator_Tests.m
    	Source/TDRouter+Handlers.m
    	Source/TDRouter.h
    	Source/TDRouter.m
    	Source/TDRouter_Tests.m
    	Source/TDServer.m
    	Source/TDURLProtocol.m
    	Source/TDView.m
    	TouchDB.xcodeproj/project.pbxproj
Commits on May 7, 2012
  1. @snej

    Read-only mode for TDListener

    snej authored
    New property TDListener.readOnly, and TouchServ "--readonly" flag.
    
    Conflicts:
    
    	Listener/TDListener.h
  2. @snej

    Beginnings of authorization work on TDRouter

    snej authored
    Added TDRouter.onAccessCheck callback so client can examine database & docID and block access.
Commits on May 4, 2012
  1. @snej

    Fixed a bunch of memory leaks and refcount cycles.

    snej authored
    Most of these only become apparent when trying to close a CouchServer or TDServer.
Commits on May 2, 2012
  1. @snej

    Removed unnecessary dispatch_queue from TDListener

    snej authored
    Wasn't being used at all anymore, now that TDServer and TDRouter
    manage their own threading.
  2. @snej

    Fix another race condition in TDHTTPResponse

    snej authored
    In some cases the HTTP listener wouldn't send a response.
    Fixes #73.
Commits on May 1, 2012
  1. @snej

    Fixed problems inserting identical attachments

    snej authored
    If a doc has two attachments with identical data, or if two docs with identical attachments are pulled in the same "batch", then insertion would fail because the second instance of the attachment couldn't be found (its writer having already been removed from the _pendingAttachments dictionary.)
    Fixed this by leaving the attachment's key (digest) behind in the dictionary for the use of subsequent insertions of the same content.
    This fixes #67.
  2. Merge branch 'master' of https://github.com/couchbaselabs/TouchDB-iOS

    authored
    Conflicts:
    	Source/TDView.m
  3. @snej
  4. @snej

    Fixed mixed-up progress counting in TDPuller

    snej authored
    It was incrementing changesTotal too much, so it looked like replications never finished.
    
    Also fixed a case where changesProcessed didn't get incremented upon an HTTP error.
Commits on Apr 18, 2012
  1. @snej

    Updated README, and added some Apache license comments

    snej authored
    The README now points out that Xcode 4.3 is required (because of the use of forward references to methods.)
  2. @snej

    Fixes for indexing documents in conflict

    snej authored
    There were a couple of problems in the situation where you're indexing a new revision that conflicts with an already-indexed revision.
    (a) If the new revision is the 'winner', the previously-emitted view rows for the earlier revision need to be removed, because that revision's not visible anymore. Otherwise you can have two revs of the same document showing up in the index.
    (b) If the new revision is the 'loser', the *older* revision needs to be indexed again, with the new emitted rows *replacing* the old ones. This is because the map function needs to see the new _conflicts array in the doc properties.
    
    This fixes #65, which reported case (a). Case (b) I noticed on my own and fixed at the same time.
  3. @snej

    Moved TDCollateRevIDs to TDRevision.m, and added TDCompareRevIDs.

    snej authored
    Small cleanup for the next commit, which needs TDCompareRevIDs.
  4. @snej

    Return custom HTTP error messages

    snej authored
    Propagate the new error messages to the response from TDURLProtocol.
    Unfortunately I can't get them into the regular HTTP status line, but they do show up in the JSON body.
Commits on Apr 17, 2012
  1. @snej @jchris

    Add extensible authorization interface to replicator.

    snej authored jchris committed
    A TDReplicator can be given a TDAuthorizer object, which is given access to requests before they're sent and can add authorization headers.
    TDAuthorizer is just a protocol, which can be implemented to do anything from basic auth to OAuth.
    A TDBasicAuthorizer is provided for basic auth.
  2. @jchris

    Merge pull request #66 from pegli/issue64

    jchris authored
    added TDStatus.h to header files included with the iOS framework
  3. @pegli
Commits on Apr 8, 2012
  1. @snej

    Make GET of _all_docs and _changes cacheable.

    snej authored
    These now set the Etag response header, and check If-None-Match: and return a 304 if it matches. (Only applies to _changes in default mode, not continuous or longpoll.)
    
    Also added some unit tests to verify cacheability.
  2. @snej
  3. @snej

    Include still current documents from previous indexing attempts in th…

    authored snej committed
    …e list of conflicts.
Commits on Apr 6, 2012
  1. Optimized check for earlier conflicts. Avoid check for earlier confli…

    authored
    …cts on the first indexing attempt.
  2. @snej

    Status code (TDStatus) overhaul

    snej authored
    * Use symbolic constants for codes, i.e. kTDStatusNotFound instead of 404.
    * Add extra, more detailed status codes and map them to custom response messages.
Commits on Apr 5, 2012
  1. @snej

    Handle a single attachment without a digest in a multipart download

    snej authored
    Attachment metadata without a digest property is a problem in multipart downloads because we can't figure out how to match the metadata with the MIME bodies.
    But the case where there's only one attachment is easy, since no mixup is possible.
    This is a partial workaround for issue #61.
Something went wrong with that request. Please try again.