From 363af890511e8cb047ea07c4e4a381680366941f Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Thu, 25 Sep 2014 18:34:54 -0700 Subject: [PATCH] Correct response status for HEAD requests The response status for some HEAD calls was changed to follow the HTTP specification a while back. Specifically, any call that supports both GET and HEAD methods should return the same response code. The API docs still list all successfull HEAD requests with a response code of 204, which is not correct in all cases. This patch adjusts the expected response status for HEAD calls to match the actual implementation. Change-Id: I6f518ebbe00a0b2860ca5db0d10b93f313abd488 Related-bug: #1334368 --- .../identity-api-v3-os-endpoint-policy.md | 8 ++++++++ .../markdown/identity-api-v3-os-trust-ext.md | 2 +- v3/src/markdown/identity-api-v3.md | 18 +++++++++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/v3/src/markdown/identity-api-v3-os-endpoint-policy.md b/v3/src/markdown/identity-api-v3-os-endpoint-policy.md index 95a8adfb..ba080668 100644 --- a/v3/src/markdown/identity-api-v3-os-endpoint-policy.md +++ b/v3/src/markdown/identity-api-v3-os-endpoint-policy.md @@ -162,3 +162,11 @@ Response: "type": "--serialization-mime-type--" } } + +#### Check if a policy is associated with endpoint: `HEAD /endpoints/{endpoint_id}/OS-ENDPOINT-POLICY/policy` + +Checks if a policy is currently associated with the given endpoint. + +Response: + + Status: 200 OK diff --git a/v3/src/markdown/identity-api-v3-os-trust-ext.md b/v3/src/markdown/identity-api-v3-os-trust-ext.md index a014cab8..c5b18f18 100644 --- a/v3/src/markdown/identity-api-v3-os-trust-ext.md +++ b/v3/src/markdown/identity-api-v3-os-trust-ext.md @@ -434,7 +434,7 @@ Relationship: `http://docs.openstack.org/api/openstack-identity/3/ext/OS-TRUST/1 Response: - Status: 204 No Content + Status: 200 OK #### Get role delegated by a trust: `GET /OS-TRUST/trusts/{trust_id}/roles/{role_id}` diff --git a/v3/src/markdown/identity-api-v3.md b/v3/src/markdown/identity-api-v3.md index c3280a09..43bd7824 100644 --- a/v3/src/markdown/identity-api-v3.md +++ b/v3/src/markdown/identity-api-v3.md @@ -472,8 +472,8 @@ communicate specific success and failure conditions to the client. #### 200 OK -This status code is returned in response to successful `GET` and `PATCH` -operations. +This status code is returned in response to successful `GET`, `HEAD` and +`PATCH` operations. #### 201 Created @@ -1863,8 +1863,11 @@ token was issued by `POST /auth/tokens?nocatalog`. Relationship: `http://docs.openstack.org/api/openstack-identity/3/rel/auth_tokens` This call is identical to `GET /auth/tokens`, but no response body is provided, -even if an error occurs or the token is invalid. A 204 response indicates that -the `X-Subject-Token` is valid. +even if an error occurs or the token is invalid. + +Response: + + Status: 200 OK #### Revoke token: `DELETE /auth/tokens` @@ -1872,7 +1875,12 @@ Relationship: `http://docs.openstack.org/api/openstack-identity/3/rel/auth_token This call is identical to `HEAD /auth/tokens` except that the `X-Subject-Token` token is immediately invalidated, regardless of its `expires_at` attribute. An -additional `X-Auth-Token` is not required. +additional `X-Auth-Token` is not required. The successful response status also +differs from `HEAD /auth/tokens`. + +Response: + + Status: 204 No Content ### Authentication Specific Routes