Skip to content

Commit

Permalink
Merge pull request #180 from apache/status413
Browse files Browse the repository at this point in the history
Document that a 413 status may be returned.
  • Loading branch information
flimzy committed Oct 23, 2017
2 parents 5befd0d + d81c7a0 commit 00a55d4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/api/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,12 @@ specific request types are provided in the corresponding API call reference.
The request headers from the client and the capabilities of the server do not
match.

- ``413 - Request Entity Too Large``

A document exceeds the configured :config:option:`couchdb/max_document_size`
value or the entire request exceeds the
:config:option:`httpd/max_http_request_size` value.

- ``415 - Bad Content Type``

The content types supported, and the content type of the information being
Expand Down
6 changes: 3 additions & 3 deletions src/config/couchdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,6 @@ Base CouchDB Options
http request body sizes. For individual document updates via `PUT`
that approximation was close enough, however that is not the case
for `_bulk_docs` endpoint. After 2.1.0 a separate configuration
parameter was defined: httpd.max_http_request_size, which can be
used to limit maximum http request sizes. After upgrade, it is
advisable to review those settings and adjust them accordingly.
parameter was defined: :config:option:`httpd/max_http_request_size`,
which can be used to limit maximum http request sizes. After upgrade,
it is advisable to review those settings and adjust them accordingly.
11 changes: 6 additions & 5 deletions src/config/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,18 @@ HTTP Server Options
`PUT` of a document larger than 1MB, but it might also block a
`_bulk_docs` update of 1000 1KB documents, or a multipart/related
update of a small document followed by two 512KB attachments. This
setting is intended to be used as a protection aginst maliciously
setting is intended to be used as a protection against maliciously
large HTTP requests rather than for limiting maximum document sizes. ::

[httpd]
max_http_request_size = 4294967296 ; 4 GB

.. warning::
Before version 2.1.0 couchdb.max_document_size was implemented
effectively as max_http_request_size. That is, it checkeded HTTP
request bodies instead of document sizes. After the upgrade, it is
advisable to review the usage of these configuration settings.
Before version 2.1.0 :config:option:`couchdb/max_document_size` was
implemented effectively as ``max_http_request_size``. That is, it
checked HTTP request bodies instead of document sizes. After the
upgrade, it is advisable to review the usage of these configuration
settings.

.. config:section:: chttpd :: Clustered HTTP Server Options
Expand Down

0 comments on commit 00a55d4

Please sign in to comment.