Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Render HTTP statuscodes correct in non http-blocks or config-sections
Browse files Browse the repository at this point in the history
Fix small typos
  • Loading branch information
big-r81 committed May 5, 2022
1 parent 9184973 commit 1fbd7e4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/api/server/authn.rst
Expand Up @@ -385,8 +385,8 @@ Two sections of config exist to configure JWT authentication;

The :config:option:`required_claims <jwt_auth/required_claims>` config
setting is a comma-separated list of additional mandatory JWT claims
that must be present in any presented JWT token. A `:code 400:Bad
Request` is sent if any are missing.
that must be present in any presented JWT token. A :statuscode:`400`
is sent if any are missing.

The ``alg`` claim is mandatory as it used to lookup the correct key for verifying the
signature.
Expand All @@ -407,8 +407,8 @@ list as long as the JWT token is valid.
; Examples
; hmac:_default = aGVsbG8=
; hmac:foo = aGVsbG8=
; The config values can represent symmetric and asymmetrics keys.
; For symmetrics keys, the value is base64 encoded;
; The config values can represent symmetric and asymmetric keys.
; For symmetric keys, the value is base64 encoded;
; hmac:_default = aGVsbG8= # base64-encoded form of "hello"
; For asymmetric keys, the value is the PEM encoding of the public
; key with newlines replaced with the escape sequence \n.
Expand Down
5 changes: 3 additions & 2 deletions src/config/auth.rst
Expand Up @@ -361,8 +361,9 @@ Authentication Configuration
.. config:option:: required_claims :: Mandatory claims in JWT tokens
This parameter is a comma-separated list of additional mandatory JWT claims
that must be present in any presented JWT token. A
`:code 400:Bad Request` is sent if any are missing. ::
that must be present in any presented JWT token. A :http:statuscode:`404`
is sent if any are missing. ::

[jwt_auth]
required_claims = exp,iat

2 changes: 1 addition & 1 deletion src/replication/conflicts.rst
Expand Up @@ -112,7 +112,7 @@ When working on a single node, CouchDB will avoid creating conflicting revisions
by returning a :statuscode:`409` error. This is because, when you
PUT a new version of a document, you must give the ``_rev`` of the previous
version. If that ``_rev`` has already been superseded, the update is rejected
with a :statuscode:`409` response.
with a :statuscode:`409` response.

So imagine two users on the same node are fetching Bob's business card, updating
it concurrently, and writing it back:
Expand Down
18 changes: 9 additions & 9 deletions src/whatsnew/3.0.rst
Expand Up @@ -176,7 +176,7 @@ Bugfixes
This should resolve a long-standing gradual memory increase bug in CouchDB.

* :ghissue:`2613`: Simultaneous attempts to create the same new database should
no longer result in a :code 500: error.
no longer result in a :statuscode:`500` error.

* :ghissue:`2678`: Defaults for the ``smoosh`` compaction daemon are now consistent
with the shipped ``default.ini`` file.
Expand Down Expand Up @@ -268,9 +268,9 @@ Features and Enhancements

* :ghissue:`1875`, :ghissue:`2437`, :ghissue:`2423`: CouchDB now supports linking against
SpiderMonkey 60 or SpiderMonkey 1.8.5. SpiderMonkey 60 provides enhanced support for
ES5, ES6, and ES2016+. Full compatibility information is available at the `ECMAScript
compatibility table`_: click on "Show obsolete platforms," then look for "FF 60 ESR"
in the list of engine types.
ES5, ES6, and ES2016+. Full compatibility information is available at the
`ECMAScript compatibility table`_. Click on "Show obsolete platforms", then look for
"FF 60 ESR" in the list of engine types.

However, it was discovered that on some ARM 64-bit distributions, SM 60 segfaults
frequently, including the SM 60 packages on CentOS 8 and Debian 10.
Expand Down Expand Up @@ -419,7 +419,7 @@ Bugfixes
to match other case clauses.

* :ghissue:`1897`: The ``/{db}/_bulk_docs`` endpoint now correctly catches invalid
(*i.e.*, non-hexadecimal) ``_rev_`` values and responds with a :code 400: error.
(*i.e.*, non-hexadecimal) ``_rev_`` values and responds with a :statuscode:`400` error.

* :ghissue:`2321`: CouchDB no longer requires Basic auth credentials to reach the
``/_session`` endpoint for login, even when ``require_valid_user`` is enabled.
Expand All @@ -435,8 +435,8 @@ Bugfixes
* :ghissue:`2153`: CouchDB no longer may return a ``badmatch`` error when querying
``all_docs`` with a passed ``keys`` array.

* :ghissue:`2137`: If search is not available, return a :code 400: instead of a
:code 500: status code.
* :ghissue:`2137`: If search is not available, return a :statuscode:`400` instead of a
:statuscode:`500` status code.

* :ghissue:`2077`: Any failed ``fsync(2)`` calls are now correctly raised to avoid
data corruption arising from retry attempts.
Expand Down Expand Up @@ -540,8 +540,8 @@ The 3.0.0 release also includes the following minor improvements:
* :ghissue:`2337`: The md5 shim (introduced to support FIPS-compliance) is now
used consistently throughout the code base.

* :ghissue:`2270`: Negative and non-integer ``heartbeat`` values now return :code 400:
Bad Request.
* :ghissue:`2270`: Negative and non-integer ``heartbeat`` values now return
:statuscode:`400`.

* :ghissue:`2268`: When rescheduling jobs, CouchDB now stops sufficient running jobs
to make room for the pending jobs.
Expand Down

0 comments on commit 1fbd7e4

Please sign in to comment.