couchbaselabs/TouchDB-iOS — pull request #23 by pegli (2012-01-09 18:25:22+00:00)
Title: HTTP listener returns 400 Bad Request for PUT /newdbname

Default behavior in TDHTTPConnection expectsRequestBodyFromMethod:atPath: is to return YES for all PUT requests, which prevents clients from creating a database using HTTP as per http://wiki.apache.org/couchdb/HTTP_database_API#PUT_.28Create_New_Database.29. Fix is to allow a PUT request if there is only one component on the URL.