Permalink
Switch branches/tags
Nothing to show
Commits on May 14, 2012
Commits on May 13, 2012
  1. Proper SSL hostname checking in TDSocketChangeTracker

    snej committed May 13, 2012
    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. Improvements to _changes feed auth handling

    snej committed May 13, 2012
    * 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. Add Apple-approved workaround for iOS 5 TLS 1.2 compatibility issue

    snej committed May 11, 2012
    Disable TLS 1.2 in TDSocketChangeTracker because some servers are incompatible with it.
    Fixes #75.
  2. SSL support for TDSocketChangeTracker

    snej committed May 11, 2012
    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. Authorization support for pull replication

    snej committed May 11, 2012
    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. Cleanup from the GNUstep merge

    snej committed May 9, 2012
  2. Merge remote-tracking branch 'refs/remotes/origin/master'

    snej committed May 9, 2012
    (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. More GNUstep fixes

    snej committed May 8, 2012
    Implement NSOperationQueue category method.
  2. Updated README.

    snej committed May 8, 2012
  3. Merge remote-tracking branch 'origin/master'

    snej committed May 7, 2012
    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. Read-only mode for TDListener

    snej committed May 7, 2012
    New property TDListener.readOnly, and TouchServ "--readonly" flag.
    
    Conflicts:
    
    	Listener/TDListener.h
  2. Beginnings of authorization work on TDRouter

    snej committed May 7, 2012
    Added TDRouter.onAccessCheck callback so client can examine database & docID and block access.
Commits on May 4, 2012
  1. Fixed a bunch of memory leaks and refcount cycles.

    snej committed May 4, 2012
    Most of these only become apparent when trying to close a CouchServer or TDServer.
Commits on May 2, 2012
  1. Removed unnecessary dispatch_queue from TDListener

    snej committed May 2, 2012
    Wasn't being used at all anymore, now that TDServer and TDRouter
    manage their own threading.
  2. Fix another race condition in TDHTTPResponse

    snej committed May 2, 2012
    In some cases the HTTP listener wouldn't send a response.
    Fixes #73.
Commits on May 1, 2012
  1. Fixed problems inserting identical attachments

    snej committed May 1, 2012
    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

    lambmj committed May 1, 2012
    Conflicts:
    	Source/TDView.m
  3. Fixed mixed-up progress counting in TDPuller

    snej committed May 1, 2012
    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. Updated README, and added some Apache license comments

    snej committed Apr 18, 2012
    The README now points out that Xcode 4.3 is required (because of the use of forward references to methods.)
  2. Fixes for indexing documents in conflict

    snej committed Apr 18, 2012
    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. Moved TDCollateRevIDs to TDRevision.m, and added TDCompareRevIDs.

    snej committed Apr 18, 2012
    Small cleanup for the next commit, which needs TDCompareRevIDs.
  4. Return custom HTTP error messages

    snej committed Apr 18, 2012
    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. Add extensible authorization interface to replicator.

    snej committed with jchris Apr 10, 2012
    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. Merge pull request #66 from pegli/issue64

    jchris committed Apr 17, 2012
    added TDStatus.h to header files included with the iOS framework
Commits on Apr 8, 2012
  1. Make GET of _all_docs and _changes cacheable.

    snej committed Apr 8, 2012
    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. Include still current documents from previous indexing attempts in th…

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

    lambmj committed Apr 6, 2012
    …cts on the first indexing attempt.
  2. Status code (TDStatus) overhaul

    snej committed Apr 6, 2012
    * Use symbolic constants for codes, i.e. kTDStatusNotFound instead of 404.
    * Add extra, more detailed status codes and map them to custom response messages.
  3. Include still current documents from previous indexing attempts in th…

    lambmj committed Apr 6, 2012
    …e list of conflicts.
Commits on Apr 5, 2012
  1. Handle a single attachment without a digest in a multipart download

    snej committed Apr 5, 2012
    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.