[
https://issues.apache.org/jira/browse/COUCHDB-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855344#comment-15855344
]
ASF GitHub Bot commented on COUCHDB-3293:
-----------------------------------------
GitHub user nickva opened a pull request:
https://github.com/apache/couchdb-couch/pull/226
Allow limiting length of document ID
Previously it was not possibly to define a maxum document ID size. That
meant
large document ID would hit various limitations and corner cases. For
example,
large document IDs could be inserted via a _bulk_docs endpoint but then
trying
to insert the same document via a single HTTP method like PUT would fail
because of a limitation in Mochiweb's HTTP parser.
Let operators specify a maxium document ID length via the:
```
couchdb.max_document_id_length = 0
```
configuration.
The default value of 0 means current behavior where document ID length is
not
checked.
COUCHDB-3293
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-couch couchdb-3293
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch/pull/226.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #226
----
commit 8e1443a8165d07311ab1c0b1a5c0a33fb48de08b
Author: Nick Vatamaniuc <[email protected]>
Date: 2017-02-07T04:53:51Z
Allow limiting length of document ID
Previously it was not possibly to define a maxum document ID size. That
meant
large document ID would hit various limitations and corner cases. For
example,
large document IDs could be inserted via a _bulk_docs endpoint but then
trying
to insert the same document via a single HTTP method like PUT would fail
because of a limitation in Mochiweb's HTTP parser.
Let operators specify a maxium document ID length via the:
```
couchdb.max_document_id_length = 0
```
configuration.
The default value of 0 means current behavior where document ID length is
not
checked.
COUCHDB-3293
----
> Configure maximum document ID length
> ------------------------------------
>
> Key: COUCHDB-3293
> URL: https://issues.apache.org/jira/browse/COUCHDB-3293
> Project: CouchDB
> Issue Type: New Feature
> Reporter: Nick Vatamaniuc
>
> Allow users / operators to specify maximum document ID length.
> Currently it is easy to break CouchDB by feeding it large IDs through
> _bulk_docs endpoint but which will hit the limits of http parser if sent
> through GET/PUT/DELETE methods. In case those limits are hit the error
> returned is not obvious as the requests would often crash in the mochiweb
> http parser step before a request even makes to CouchDB code.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)