HTTP
HTTP协议
- HTTP是Web浏览器和Web服务器之间通信的标准协议
- HTTP指定客户端与服务器如何建立连接、客户端如何从服务器请求数据,服务器如何响应请求,以及最后如何关闭连接
- HTTP连接使用TCP/IP来传输数据
对于从客户端到服务器的每一个请求,都有4个步骤(基本HTTP1.0过程):
- 默认情况下,客户端在端口80 打开与服务器的一个TCP连接,URL中还可以指定其他端口
- 客户端向服务器发送消息,请求指定路径上的资源。这个请求包括一个首部,可选地(取决于请求的性质)还可以有一个空行,后面是这个请求的资源
- 服务器想客户端发送相应。响应以响应码开头,后面是包含元数据的首部,一个空行以及所请求的文档或错误信息
- 服务器关闭连接
HTTP 1.1响应码
响应码和信息 | 含义 | HttpURLConnection |
---|---|---|
1XX | 信息 | |
100 Continue | 服务器准备接受请求主体,客户端应当发送请求主体;这允许客户端在请求中发送大量数据之前询问服务器是否将接受请求 | N/A |
101 Switching Protocols | 服务器接受客户端在Upgrade首部字段中要求改变应用协议的请求,如从HTTP改为WebSockets | N/A |
2XX Successful | 请求成功 | ---- |
200 OK | 最常见的响应码。如果请求方法是GET或POST,所请求的数据与正常的首部一起包含在响应中。如果请求方法是HEAD则只包含首部信息 | HTTP_OK |
201 Created | 服务器已经在响应主体中指定的URL出创建了资源。客户端现在应尝试加载该URL。这个响应码只在响应POST请求时发送 | HTTP_CREATED |
202 Accepted | 这是个很不常见的响应,表示请求(一般是POST)已经被处理,但处理尚未结束,所以不会返回任何响应。不过,服务器应当为用户返回一个HTML页面解释这个情况,并估计请求可能何时结束,理想情况下要提供某种状态监视器的链接 | HTTP_ACCEPTED |
203 Non-authoritative Information | 由缓存代理或其他本地资源返回资源的表示,不能保证是最新的 | HTTP_NON_AUTHORITATIVE |
204 No Content | 服务器已经成功处理了请求,但没有信息发回给客户端,这一般是由于服务器上的表单处理程序编写的很差,只接受数据却不向用户返回响应 | HTTP_NO_CONTENT |
205 Reset Content | 服务器已经成功地处理了请求,但没有信息发回给客户端。此外,客户端应当清除发送请求的表单 | HTTP_RESET |
206 Partial Content | 服务器返回客户端请求的资源的一部分(使用HTTP的字节范围扩展),而不是整个文档 | HTTP_PARTIAL |
226 IM Used | 响应得到delta编码 | N/A |
3XX Redirection | 重定位及重定向 | |
300 Multiple Choices | 服务器为所请求的文档提供一组不同的表示(例如PostScript和PDF) | HTTP_MULT_CHOICE |
301 Moved Permanently | 资源已经移动到一个新的URL。客户端应当自动加载这个URL的资源,更新所有指向原URL的书签 | HTTP_MOVED_PERM |
302 Moved Temporarily | 这个资源暂时位于一个新的URL,但其位置在不久的将来还会再次改变,所以不应当更新书签。有时有些代理要求用户在访问Web之前先在本地登录,此时会用到这个响应码 | HTTP_MOVED_TEMP |
303 See Other | 一般用于响应POST表单请求,这个响应码表示用户应当使用GET从另一个不同的URL获取资源 | HTTP_SET_OTHER |
304 Not Modified | If-Modified-Since 首部指示客户端只需要最近更新的文档。如果文档没有更新,就会返回这个状态码。在这种情况下,客户端应当从缓存中加载这个文档 | HTTP_NOT_MODIFIED |
305 Use Proxy | Location 首部字段包含将提供响应的代理的地址 | HTTP_USE_PROXY |
307 Temporary Redirect | 类似于响应码302,但不允许HTTP方法改变 | N/A |
308 Permanent Redirect | 类似于响应码301,但不允许HTTP方法改变 | N/A |
4XX | 客户端错误 | |
400 Bad Request | 客户端想服务器发出的请求使用了不正确的语法。这在正常的Web浏览时很不常见,但是在调试定制客户端时比较常见 | HTTP_BAD_REQUEST |
401 Unauthorized | 访问这个页面需要身份认证,一般是用户名和口令。用户名和口令中可能有一个没有给出,或者用户名和口令无效 | HTTP_UNAUTHORIZED |
402 Payment Required | 现在没有使用,但将来可能用于指示访问该资源需要某种付费 | HTTP_PAYMENT_REQUIRED |
403 Forbidden | 服务器理解请求,但有意地拒绝进行处理。身份认证没有任何帮助。当客户端超出其配额时有时会使用这个响应码 | HTTP_FORBIDDEN |
404 Not Found | 最常见的错误响应,指示服务器找不到所请求的资源。它可能指示一个不正确的链接,已经移走而没有转发地址的文档,拼写错误的URL或其他类似情况 | HTTP_NOT_FOUND |
405 Method Not Allowed | 请求方法不支持指定的资源;例如,试图在不支持PUT的Web服务器上使用PUT放置文件,或者使用POST提交到只支持GET的URI | HTTP_BAD_METHOD |
406 Not Acceptable | 所请求的资源不能以客户端希望的格式提供,客户端期望的格式由请求HTTP首部的Accept字段指示 | HTTP_NOT_ACCEPTABLE |
407 Proxy Authentication Required | 中间代理服务器要求客户端在获取所请求的资源之前,先对客户端进行身份认证(可能采用用户名和口令的形式) | HTTP_PROXY_AUTH |
408 Request Timeout | 客户端用了太长时间发送请求,可能是因为网络拥塞的原因 | HTTP_CLIENT_TIMEOUT |
409 Conflict | 一个临时冲突阻止了请求的实现。例如,两个客户端试图同时PUT相同的文件 | HTTP_CONFLICT |
410 Gone | 与404类似,但更有把握地确定资源的存在性。资源已经被有意地删除(不是移走),不能恢复。应当删除相应的链接 | HTTP_GONE |
411 Length Required | 客户端必须在请求HTTP首部中发送一个Content-length字段,但没有做到 | HTTP_LENGTH_REQUIRED |
412 Precondition Failed | 客户端在请求HTTP首部中指定一个请求条件没有满足 | HTTP_PRECON_FAILED |
413 Request Entity Too Large | 客户端请求主体大于服务器一次能够处理的大小 | HTTP_ENTITY_TOO_LARGE |
414 Request-URI Too Long | 请求的URI太长。这对于防止某种缓冲区溢出攻击很重要 | HTTP_REQ_TOO_LONG |
415 Unsupported Media Type | 服务器不理解或不接受请求主体的MIME content-type | HTTP_UNSUPPORTED_TYPE |
416 Requested range Not Satisfiable | 服务器无法发送客户端所请求的字节范围 | N/A |
417 Expectation Failed | 服务器无法满足客户端在Expect-request首部字段中给定的期望 | N/A |
418 I‘m a teapot | 尝试用蜜罐泡咖啡 | N/A |
420 Enhance Your Calm | 服务器分级限制请求。这是非标准的,仅用于Twitter | N/A |
422 Unprocessable Entity | 不能识别请求主体的内容类型,请求主体的语法是正确的,只是服务器无法处理 | N/A |
424 Failed Dependency | 由于之前一个请求的失败,导致这个请求失败 | N/A |
426 Upgrade Required | 客户端使用一个太老或不安全的HTTP协议版本 | N/A |
428 Precondition Required | 请求必须提供一个If-Match首部 | N/A |
429 Too Many Requests | 客户端被分级限制,要慢下来 | N/A |
431 request Header Fields Too Large | 可能首部作为一个整体太大,或者某个首部字段太大 | N/A |
451 Unavailable For Legal Reasons | 这是一个试验性的响应码,由于法律原因禁止服务器提供请求服务 | N/A |
5XX | 服务器错误 | HTTP_SERVER_ERROR |
500 Internal Server Error | 发生了意外情况,服务器不知道如何处理 | HTTP_INTERNAL_ERROR |
501 Not Implemented | 服务器不具有完成这个请求所需要的一个特性。不能处理PUT请求的服务器可能会试图PUT表单数据的客户端发送这个响应 | HTTP_NOT_IMPLEMENTED |
502 Bad Gateway | 这个响应码只用于作为代理或网关的服务器。它指示该代理在试图完成请求时,从它链接的服务器接收到一个无效的响应 | HTTP_BAD_GATEWAY |
503 Service Unavailable | 服务器暂时无法处理请求,可能是超负荷或维护原因 | HTTP_UNAVAILABLE |
504 Geteway Timeout | 代理服务器在合理的时间内未能接收到上游服务器的响应,所以无法将向客户端发送所需的响应 | HTTP_GATEWAT_TIMEOUT |
505 HTTP Version Not Supported | 服务器不支持客户端正在使用的HTP版本(如目前还不存在的HTTP 2.0) | HTTP_VERSION |
507 Insufficient Storage | 服务器没有足够的空间来存放所提供的请求实体。通常用于POST或PUT | N/A |
511 Network Authentication Required | 客户端需要身份认证才能访问网络(例如,在一个旅馆的无线网络上) | N/A |
Keep-Alive
在请求首部里加上 connection : Keep-Alive
Java中的HttpStatus
public enum HttpStatus { // 1xx Informational /** * {@code 100 Continue}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.2.1">HTTP/1.1: Semantics and Content, section 6.2.1</a> */ CONTINUE(100, "Continue"), /** * {@code 101 Switching Protocols}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.2.2">HTTP/1.1: Semantics and Content, section 6.2.2</a> */ SWITCHING_PROTOCOLS(101, "Switching Protocols"), /** * {@code 102 Processing}. * @see <a href="https://tools.ietf.org/html/rfc2518#section-10.1">WebDAV</a> */ PROCESSING(102, "Processing"), /** * {@code 103 Checkpoint}. * @see <a href="https://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal">A proposal for supporting * resumable POST/PUT HTTP requests in HTTP/1.0</a> */ CHECKPOINT(103, "Checkpoint"), // 2xx Success /** * {@code 200 OK}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">HTTP/1.1: Semantics and Content, section 6.3.1</a> */ OK(200, "OK"), /** * {@code 201 Created}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.2">HTTP/1.1: Semantics and Content, section 6.3.2</a> */ CREATED(201, "Created"), /** * {@code 202 Accepted}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.3">HTTP/1.1: Semantics and Content, section 6.3.3</a> */ ACCEPTED(202, "Accepted"), /** * {@code 203 Non-Authoritative Information}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.4">HTTP/1.1: Semantics and Content, section 6.3.4</a> */ NON_AUTHORITATIVE_INFORMATION(203, "Non-Authoritative Information"), /** * {@code 204 No Content}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.5">HTTP/1.1: Semantics and Content, section 6.3.5</a> */ NO_CONTENT(204, "No Content"), /** * {@code 205 Reset Content}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.3.6">HTTP/1.1: Semantics and Content, section 6.3.6</a> */ RESET_CONTENT(205, "Reset Content"), /** * {@code 206 Partial Content}. * @see <a href="https://tools.ietf.org/html/rfc7233#section-4.1">HTTP/1.1: Range Requests, section 4.1</a> */ PARTIAL_CONTENT(206, "Partial Content"), /** * {@code 207 Multi-Status}. * @see <a href="https://tools.ietf.org/html/rfc4918#section-13">WebDAV</a> */ MULTI_STATUS(207, "Multi-Status"), /** * {@code 208 Already Reported}. * @see <a href="https://tools.ietf.org/html/rfc5842#section-7.1">WebDAV Binding Extensions</a> */ ALREADY_REPORTED(208, "Already Reported"), /** * {@code 226 IM Used}. * @see <a href="https://tools.ietf.org/html/rfc3229#section-10.4.1">Delta encoding in HTTP</a> */ IM_USED(226, "IM Used"), // 3xx Redirection /** * {@code 300 Multiple Choices}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.1">HTTP/1.1: Semantics and Content, section 6.4.1</a> */ MULTIPLE_CHOICES(300, "Multiple Choices"), /** * {@code 301 Moved Permanently}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.2">HTTP/1.1: Semantics and Content, section 6.4.2</a> */ MOVED_PERMANENTLY(301, "Moved Permanently"), /** * {@code 302 Found}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.3">HTTP/1.1: Semantics and Content, section 6.4.3</a> */ FOUND(302, "Found"), /** * {@code 302 Moved Temporarily}. * @see <a href="https://tools.ietf.org/html/rfc1945#section-9.3">HTTP/1.0, section 9.3</a> * @deprecated in favor of {@link #FOUND} which will be returned from {@code HttpStatus.valueOf(302)} */ @Deprecated MOVED_TEMPORARILY(302, "Moved Temporarily"), /** * {@code 303 See Other}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.4">HTTP/1.1: Semantics and Content, section 6.4.4</a> */ SEE_OTHER(303, "See Other"), /** * {@code 304 Not Modified}. * @see <a href="https://tools.ietf.org/html/rfc7232#section-4.1">HTTP/1.1: Conditional Requests, section 4.1</a> */ NOT_MODIFIED(304, "Not Modified"), /** * {@code 305 Use Proxy}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.5">HTTP/1.1: Semantics and Content, section 6.4.5</a> * @deprecated due to security concerns regarding in-band configuration of a proxy */ @Deprecated USE_PROXY(305, "Use Proxy"), /** * {@code 307 Temporary Redirect}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.4.7">HTTP/1.1: Semantics and Content, section 6.4.7</a> */ TEMPORARY_REDIRECT(307, "Temporary Redirect"), /** * {@code 308 Permanent Redirect}. * @see <a href="https://tools.ietf.org/html/rfc7238">RFC 7238</a> */ PERMANENT_REDIRECT(308, "Permanent Redirect"), // --- 4xx Client Error --- /** * {@code 400 Bad Request}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">HTTP/1.1: Semantics and Content, section 6.5.1</a> */ BAD_REQUEST(400, "Bad Request"), /** * {@code 401 Unauthorized}. * @see <a href="https://tools.ietf.org/html/rfc7235#section-3.1">HTTP/1.1: Authentication, section 3.1</a> */ UNAUTHORIZED(401, "Unauthorized"), /** * {@code 402 Payment Required}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.2">HTTP/1.1: Semantics and Content, section 6.5.2</a> */ PAYMENT_REQUIRED(402, "Payment Required"), /** * {@code 403 Forbidden}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.3">HTTP/1.1: Semantics and Content, section 6.5.3</a> */ FORBIDDEN(403, "Forbidden"), /** * {@code 404 Not Found}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.4">HTTP/1.1: Semantics and Content, section 6.5.4</a> */ NOT_FOUND(404, "Not Found"), /** * {@code 405 Method Not Allowed}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.5">HTTP/1.1: Semantics and Content, section 6.5.5</a> */ METHOD_NOT_ALLOWED(405, "Method Not Allowed"), /** * {@code 406 Not Acceptable}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.6">HTTP/1.1: Semantics and Content, section 6.5.6</a> */ NOT_ACCEPTABLE(406, "Not Acceptable"), /** * {@code 407 Proxy Authentication Required}. * @see <a href="https://tools.ietf.org/html/rfc7235#section-3.2">HTTP/1.1: Authentication, section 3.2</a> */ PROXY_AUTHENTICATION_REQUIRED(407, "Proxy Authentication Required"), /** * {@code 408 Request Timeout}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.7">HTTP/1.1: Semantics and Content, section 6.5.7</a> */ REQUEST_TIMEOUT(408, "Request Timeout"), /** * {@code 409 Conflict}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.8">HTTP/1.1: Semantics and Content, section 6.5.8</a> */ CONFLICT(409, "Conflict"), /** * {@code 410 Gone}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.9"> * HTTP/1.1: Semantics and Content, section 6.5.9</a> */ GONE(410, "Gone"), /** * {@code 411 Length Required}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.10"> * HTTP/1.1: Semantics and Content, section 6.5.10</a> */ LENGTH_REQUIRED(411, "Length Required"), /** * {@code 412 Precondition failed}. * @see <a href="https://tools.ietf.org/html/rfc7232#section-4.2"> * HTTP/1.1: Conditional Requests, section 4.2</a> */ PRECONDITION_FAILED(412, "Precondition Failed"), /** * {@code 413 Payload Too Large}. * @since 4.1 * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.11"> * HTTP/1.1: Semantics and Content, section 6.5.11</a> */ PAYLOAD_TOO_LARGE(413, "Payload Too Large"), /** * {@code 413 Request Entity Too Large}. * @see <a href="https://tools.ietf.org/html/rfc2616#section-10.4.14">HTTP/1.1, section 10.4.14</a> * @deprecated in favor of {@link #PAYLOAD_TOO_LARGE} which will be * returned from {@code HttpStatus.valueOf(413)} */ @Deprecated REQUEST_ENTITY_TOO_LARGE(413, "Request Entity Too Large"), /** * {@code 414 URI Too Long}. * @since 4.1 * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.12"> * HTTP/1.1: Semantics and Content, section 6.5.12</a> */ URI_TOO_LONG(414, "URI Too Long"), /** * {@code 414 Request-URI Too Long}. * @see <a href="https://tools.ietf.org/html/rfc2616#section-10.4.15">HTTP/1.1, section 10.4.15</a> * @deprecated in favor of {@link #URI_TOO_LONG} which will be returned from {@code HttpStatus.valueOf(414)} */ @Deprecated REQUEST_URI_TOO_LONG(414, "Request-URI Too Long"), /** * {@code 415 Unsupported Media Type}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.13"> * HTTP/1.1: Semantics and Content, section 6.5.13</a> */ UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Type"), /** * {@code 416 Requested Range Not Satisfiable}. * @see <a href="https://tools.ietf.org/html/rfc7233#section-4.4">HTTP/1.1: Range Requests, section 4.4</a> */ REQUESTED_RANGE_NOT_SATISFIABLE(416, "Requested range not satisfiable"), /** * {@code 417 Expectation Failed}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.5.14"> * HTTP/1.1: Semantics and Content, section 6.5.14</a> */ EXPECTATION_FAILED(417, "Expectation Failed"), /** * {@code 418 I'm a teapot}. * @see <a href="https://tools.ietf.org/html/rfc2324#section-2.3.2">HTCPCP/1.0</a> */ I_AM_A_TEAPOT(418, "I'm a teapot"), /** * @deprecated See * <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt"> * WebDAV Draft Changes</a> */ @Deprecated INSUFFICIENT_SPACE_ON_RESOURCE(419, "Insufficient Space On Resource"), /** * @deprecated See * <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt"> * WebDAV Draft Changes</a> */ @Deprecated METHOD_FAILURE(420, "Method Failure"), /** * @deprecated * See <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt"> * WebDAV Draft Changes</a> */ @Deprecated DESTINATION_LOCKED(421, "Destination Locked"), /** * {@code 422 Unprocessable Entity}. * @see <a href="https://tools.ietf.org/html/rfc4918#section-11.2">WebDAV</a> */ UNPROCESSABLE_ENTITY(422, "Unprocessable Entity"), /** * {@code 423 Locked}. * @see <a href="https://tools.ietf.org/html/rfc4918#section-11.3">WebDAV</a> */ LOCKED(423, "Locked"), /** * {@code 424 Failed Dependency}. * @see <a href="https://tools.ietf.org/html/rfc4918#section-11.4">WebDAV</a> */ FAILED_DEPENDENCY(424, "Failed Dependency"), /** * {@code 425 Too Early}. * @since 5.2 * @see <a href="https://tools.ietf.org/html/rfc8470">RFC 8470</a> */ TOO_EARLY(425, "Too Early"), /** * {@code 426 Upgrade Required}. * @see <a href="https://tools.ietf.org/html/rfc2817#section-6">Upgrading to TLS Within HTTP/1.1</a> */ UPGRADE_REQUIRED(426, "Upgrade Required"), /** * {@code 428 Precondition Required}. * @see <a href="https://tools.ietf.org/html/rfc6585#section-3">Additional HTTP Status Codes</a> */ PRECONDITION_REQUIRED(428, "Precondition Required"), /** * {@code 429 Too Many Requests}. * @see <a href="https://tools.ietf.org/html/rfc6585#section-4">Additional HTTP Status Codes</a> */ TOO_MANY_REQUESTS(429, "Too Many Requests"), /** * {@code 431 Request Header Fields Too Large}. * @see <a href="https://tools.ietf.org/html/rfc6585#section-5">Additional HTTP Status Codes</a> */ REQUEST_HEADER_FIELDS_TOO_LARGE(431, "Request Header Fields Too Large"), /** * {@code 451 Unavailable For Legal Reasons}. * @see <a href="https://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status-04"> * An HTTP Status Code to Report Legal Obstacles</a> * @since 4.3 */ UNAVAILABLE_FOR_LEGAL_REASONS(451, "Unavailable For Legal Reasons"), // --- 5xx Server Error --- /** * {@code 500 Internal Server Error}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.1">HTTP/1.1: Semantics and Content, section 6.6.1</a> */ INTERNAL_SERVER_ERROR(500, "Internal Server Error"), /** * {@code 501 Not Implemented}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.2">HTTP/1.1: Semantics and Content, section 6.6.2</a> */ NOT_IMPLEMENTED(501, "Not Implemented"), /** * {@code 502 Bad Gateway}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.3">HTTP/1.1: Semantics and Content, section 6.6.3</a> */ BAD_GATEWAY(502, "Bad Gateway"), /** * {@code 503 Service Unavailable}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.4">HTTP/1.1: Semantics and Content, section 6.6.4</a> */ SERVICE_UNAVAILABLE(503, "Service Unavailable"), /** * {@code 504 Gateway Timeout}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.5">HTTP/1.1: Semantics and Content, section 6.6.5</a> */ GATEWAY_TIMEOUT(504, "Gateway Timeout"), /** * {@code 505 HTTP Version Not Supported}. * @see <a href="https://tools.ietf.org/html/rfc7231#section-6.6.6">HTTP/1.1: Semantics and Content, section 6.6.6</a> */ HTTP_VERSION_NOT_SUPPORTED(505, "HTTP Version not supported"), /** * {@code 506 Variant Also Negotiates} * @see <a href="https://tools.ietf.org/html/rfc2295#section-8.1">Transparent Content Negotiation</a> */ VARIANT_ALSO_NEGOTIATES(506, "Variant Also Negotiates"), /** * {@code 507 Insufficient Storage} * @see <a href="https://tools.ietf.org/html/rfc4918#section-11.5">WebDAV</a> */ INSUFFICIENT_STORAGE(507, "Insufficient Storage"), /** * {@code 508 Loop Detected} * @see <a href="https://tools.ietf.org/html/rfc5842#section-7.2">WebDAV Binding Extensions</a> */ LOOP_DETECTED(508, "Loop Detected"), /** * {@code 509 Bandwidth Limit Exceeded} */ BANDWIDTH_LIMIT_EXCEEDED(509, "Bandwidth Limit Exceeded"), /** * {@code 510 Not Extended} * @see <a href="https://tools.ietf.org/html/rfc2774#section-7">HTTP Extension Framework</a> */ NOT_EXTENDED(510, "Not Extended"), /** * {@code 511 Network Authentication Required}. * @see <a href="https://tools.ietf.org/html/rfc6585#section-6">Additional HTTP Status Codes</a> */ NETWORK_AUTHENTICATION_REQUIRED(511, "Network Authentication Required"); }
posted on 2023-02-16 08:17 JavaCoderPan 阅读(44) 评论(0) 编辑 收藏 举报
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南