转自:1) http://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3.html#unauthorized

     2) http://openq.cn/http-statuscode-status-code-200300400500-sequence/

完整版在这里: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

HTTP Status Codes

The Identity API uses a subset of the available HTTP status codes to communicate specific success and failure conditions to the client.

200 OK

This status code is returned in response to successful GETHEAD and PATCH operations.

201 Created

This status code is returned in response to successful POST operations.

204 No Content

This status code is returned in response to successful HEADPUT and DELETE operations.

300 Multiple Choices

This status code is returned by the root identity endpoint, with references to one or more Identity API versions (such as /v3/).

400 Bad Request

This status code is returned when the Identity service fails to parse the request as expected. This is most frequently returned when a required attribute is missing, a disallowed attribute is specified (such as an idon POST in a basic CRUD operation), or an attribute is provided of an unexpected data type.

The client is assumed to be in error.

401 Unauthorized

This status code is returned when either authentication has not been performed, the provided X-Auth-Token is invalid or authentication credentials are invalid (including the user, project or domain having been disabled).

403 Forbidden

This status code is returned when the request is successfully authenticated but not authorized to perform the requested action.

404 Not Found

This status code is returned in response to failed GETHEADPOSTPUTPATCH and DELETE operations when a referenced entity cannot be found by ID. In the case of a POST request, the referenced entity may be in the request body as opposed to the resource path.

409 Conflict

This status code is returned in response to failed POST and PATCH operations. For example, when a client attempts to update an entity’s unique attribute which conflicts with that of another entity in the same collection.

Alternatively, a client should expect this status code when attempting to perform the same create operation twice in a row on a collection with a user-defined and unique attribute. For example, a User’sname attribute is defined to be unique and user-defined, so making the same POST /users request twice in a row will result in this status code.

The client is assumed to be in error.

500 Internal Server Error

This status code is returned when an unexpected error has occurred in the Identity service implementation.

501 Not Implemented

This status code is returned when the Identity service implementation is unable to fulfill the request because it is incapable of implementing the entire API as specified.

For example, an Identity service may be incapable of returning an exhaustive collection of Projects with any reasonable expectation of performance, or lack the necessary permission to create or modify the collection of users (which may be managed by a remote system); the implementation may therefore choose to return this status code to communicate this condition to the client.

503 Service Unavailable

This status code is returned when the Identity service is unable to communicate with a backend service, or by a proxy in front of the Identity service unable to communicate with the Identity service itself.

===============================下边是中文的,与上边内容基本一致====================================================================

201-206都表示服务器成功处理了请求的状态代码,说明网页可以正常访问。
200(成功) 服务器已成功处理了请求。通常,这表示服务器提供了请求的网页。
201(已创建) 请求成功且服务器已创建了新的资源。
202(已接受) 服务器已接受了请求,但尚未对其进行处理。
203(非授权信息) 服务器已成功处理了请求,但返回了可能来自另一来源的信息。
204(无内容) 服务器成功处理了请求,但未返回任何内容。
205(重置内容) 服务器成功处理了请求,但未返回任何内容。与 204 响应不同,此响应要求请求者重置文档视图(例如清除表单内容以输入新内容)。
206(部分内容) 服务器成功处理了部分 GET 请求。

300-3007表示的意思是:要完成请求,您需要进一步进行操作。通常,这些状态代码是永远重定向的。

300(多种选择) 服务器根据请求可执行多种操作。服务器可根据请求者 来选择一项操作,或提供操作列表供其选择。

301(永久移动) 请求的网页已被永久移动到新位置。服务器返回此响应时,会自动将请求者转到新位置。您应使用此代码通知搜索引擎蜘蛛网页或网站已被永久移动到新位置。
302(临时移动) 服务器目前正从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求。会自动将请求者转到不同的位置。但由于搜索引擎会继续抓取原有位置并将其编入索引,因此您不应使用此代码来告诉搜索引擎页面或网站已被移动。
303(查看其他位置) 当请求者应对不同的位置进行单独的 GET 请求以检索响应时,服务器会返回此代码。对于除 HEAD 请求之外的所有请求,服务器会自动转到其他位置。
304(未修改) 自从上次请求后,请求的网页未被修改过。服务器返回此响应时,不会返回网页内容。

如果网页自请求者上次请求后再也没有更改过,您应当将服务器配置为返回此响应。由于服务器可以告诉 搜索引擎自从上次抓取后网页没有更改过,因此可节省带宽和开销。

305(使用代理) 请求者只能使用代理访问请求的网页。如果服务器返回此响应,那么,服务器还会指明请求者应当使用的代理。
307(临时重定向) 服务器目前正从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求。会自动将请求者转到不同的位置。但由于搜索引擎会继续抓取原有位置并将其编入索引,因此您不应使用此代码来告诉搜索引擎某个页面或网站已被移动。

4XXHTTP状态码表示请求可能出错,会妨碍服务器的处理。

400(错误请求) 服务器不理解请求的语法。

401(身份验证错误) 此页要求授权。您可能不希望将此网页纳入索引。

403(禁止) 服务器拒绝请求。

404(未找到) 服务器找不到请求的网页。例如,对于服务器上不存在的网页经常会返回此代码。

例如:http://www.0631abc.com/20100aaaa,就会进入404错误页面

405(方法禁用) 禁用请求中指定的方法。

406(不接受) 无法使用请求的内容特性响应请求的网页。

407(需要代理授权) 此状态码与 401 类似,但指定请求者必须授权使用代理。如果服务器返回此响应,还表示请求者应当使用代理。

408(请求超时) 服务器等候请求时发生超时。

409(冲突) 服务器在完成请求时发生冲突。服务器必须在响应中包含有关冲突的信息。服务器在响应与前一个请求相冲突的 PUT 请求时可能会返回此代码,以及两个请求的差异列表。

410(已删除) 请求的资源永久删除后,服务器返回此响应。该代码与 404(未找到)代码相似,但在资源以前存在而现在不存在的情况下,有时会用来替代 404 代码。如果资源已永久删除,您应当使用 301 指定资源的新位置。

411(需要有效长度) 服务器不接受不含有效内容长度标头字段的请求。

412(未满足前提条件) 服务器未满足请求者在请求中设置的其中一个前提条件。

413(请求实体过大) 服务器无法处理请求,因为请求实体过大,超出服务器的处理能力。

414(请求的 URI 过长) 请求的 URI(通常为网址)过长,服务器无法处理。

415(不支持的媒体类型) 请求的格式不受请求页面的支持。

416(请求范围不符合要求) 如果页面无法提供请求的范围,则服务器会返回此状态码。

417(未满足期望值) 服务器未满足"期望"请求标头字段的要求。

500至505表示的意思是:服务器在尝试处理请求时发生内部错误。这些错误可能是服务器本身的错误,而不是请求出错。

500(服务器内部错误) 服务器遇到错误,无法完成请求。

501(尚未实施) 服务器不具备完成请求的功能。例如,当服务器无法识别请求方法时,服务器可能会返回此代码。

502(错误网关) 服务器作为网关或代理,从上游服务器收到了无效的响应。

503(服务不可用) 目前无法使用服务器(由于超载或进行停机维护)。通常,这只是一种暂时的状态。

504(网关超时) 服务器作为网关或代理,未及时从上游服务器接收请求。

505(HTTP 版本不受支持) 服务器不支持请求中所使用的 HTTP 协议版本。

http statusCode(状态码)的更多相关文章

  1. 【JQuery基础知识/statusCode(状态码)】---初学者必备

    今天,给大家分享一下JQuery的基础知识,简单介绍一下JQuery高级_Ajax,和我们常见的一些statusCode(状态码)~~~ 如果存在错误,请大家多多指正留言~小女子在此谢过! 一.JQu ...

  2. http statusCode(状态码)请求URL返回状态值的含义

    http statusCode(状态码)请求URL返回状态值的含义 请求URL浏览器返回状态码的含义(http statusCode): 201-206都表示服务器成功处理了请求的状态代码,说明网页可 ...

  3. http statusCode(状态码) 200、300、400、500序列

    201-206都表示服务器成功处理了请求的状态代码,说明网页可以正常访问.        200(成功)  服务器已成功处理了请求.通常,这表示服务器提供了请求的网页.        201(已创建) ...

  4. http statusCode(状态码)含义

    201-206都表示服务器成功处理了请求的状态代码,说明网页可以正常访问. 200(成功) 服务器已成功处理了请求.通常,这表示服务器提供了请求的网页. 201(已创建) 请求成功且服务器已创建了新的 ...

  5. http statusCode(状态码) 200、300、400、500序列详解

    201-206都表示服务器成功处理了请求的状态代码,说明网页可以正常访问.200(成功) 服务器已成功处理了请求.通常,这表示服务器提供了请求的网页.201(已创建) 请求成功且服务器已创建了新的资源 ...

  6. (404) 未找到 获取StatusCode状态码

    异常代码: (HttpWebResponse)req.GetResponse(); 当执行这段代码出现异常 解决问题 那如果我们想获得错误发生时候服务器段错误页面的源代码该如何做呢? 其实非常非常简单 ...

  7. c# HttpWebResponse 各种情况下 获取StatusCode状态码

    捕捉网页出现404.500等会直接抛出WebException异常 异常代码: (HttpWebResponse)req.GetResponse(); 当执行这段代码出现异常 解决问题 那如果我们想获 ...

  8. 常见状态码StatusCode

    当浏览者访问一个网页时,浏览者的浏览器会向网页所在服务器发出请求.当浏览器接收并显示网页前,此网页所在的服务器会返回一个包含HTTP状态码的信息头(server header)用以响应浏览器的请求. ...

  9. WebService异常时,查看请求状态码方法

    /// <summary> /// Test 的摘要说明 /// </summary> [WebService(Namespace = "http://tempuri ...

随机推荐

  1. hive odbc

    C:\Windows\SysWOW64  

  2. 获取SQLSERVER所有库 所有表 所有列 所有字段信息

    最近想起来做一个项目代码生成器,直接生成底层代码.. 这免不了要先行读取数据库已有的信息.. 废话不多说..开整.. SELECT NAME FROM MASTER..SYSDATABASES --读 ...

  3. C# 协变out 、逆变 in

    需求:泛型使用多态性 备注:协变逆变只能修饰 接口和委托 简单理解: 1.使用 in 修饰后为逆变,只能用作形参使用 ,参考 public delegate void Action<in T&g ...

  4. apt-get 与 yum的区别 (转)

    一般来说著名的linux系统基本上分两大类:1.RedHat系列:Redhat.Centos.Fedora等2.Debian系列:Debian.Ubuntu等 RedHat 系列 1 常见的安装包格式 ...

  5. Eclipse插件checkstyle安装使用

    方法一:   1.Eclipse中,选择Help->Software Updates->Find and Install   2.选择 Search for new features to ...

  6. alter和alert防错?

    在js中这个错误经常容易犯, 那就是 alter 和 alert这两个单词经常写错. 导致js出错, 而不执行! 注意: 在js脚本中, 是 alert 弹出提示框, 而不是 alter ,js中没有 ...

  7. php从零开始

    吐槽:今天开始撸PHP了,从此前端少了个小白,PHP多了个小白... 本白从3年前陆陆续续开始一会儿撸会儿PHP一会儿撸前端.前端撸的比较多,PHP撸的比较少,当然本白撸php大多都是被逼的!! 然后 ...

  8. 2015年12月01日 GitHub入门学习(二)手把手教你Git安装

    序:Mac与Linux中,Mac都预装了Git,各版本的Linux也都提供了Git的软件包.下面手把手教你Windows下的安装. 一.Git Windows GUI 下载地址 msysgit htt ...

  9. [译]通过IIS Request Filtering解决SQL Server CPU高的问题

    原文http://www.peterviola.com/solving-sql-server-high-cpu-with-iis-request-filtering/ Top Queries by T ...

  10. 【codevs1380】没有上司的舞会

    题目描述 Ural大学有N个职员,编号为1~N.他们有从属关系,也就是说他们的关系就像一棵以校长为根的树,父结点就是子结点的直接上司.每个职员有一个快乐指数.现在有个周年庆宴会,要求与会职员的快乐指数 ...