fix: Add percentencoding to special character +
#108
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As documented in CouchDB issues apache/couchdb#2144 and apache/couchdb#1830 creation of documents and attachments with unescaped
+
inid
and attachment name is possible but requires them to be percentencoded while retrieving.This PR provides a workaround to the issue #104 by percentencoding
+
and hence allowing creation,retrieval,updation and deletion of documents with+
in their ids.This change requires an update to Kitura-NIO 2.2 to pick changes from PR (Kitura/Kitura-NIO#199) to work, and hence won't work for anyone using Kitura-NIO with Swift 4.
Description
Added
static func escape(url: String)
which takescustomAllowedCharacterSet
as argument to escape+
Motivation and Context
This PR provides a workaround to this issue by percentencoding
+
and henceallow creation,retrieval,updation and deletion of documents with
+
in theirids.
Fixes the issue #104 .
How Has This Been Tested?
Tested creation, retrieval, updation and deletion of CouchDb documents with
+
in theirid
. Added Test case for creation, addition, retrieval and deletion of document attachments+
in the attachment names.Checklist: