You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/09/08 16:43:51 UTC
httpcomponents-core git commit: HTTPCORE-553: add HTTP status codes
from RFC 5842
Repository: httpcomponents-core
Updated Branches:
refs/heads/master 18cbd6cdb -> 5a498afe0
HTTPCORE-553: add HTTP status codes from RFC 5842
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/5a498afe
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/5a498afe
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/5a498afe
Branch: refs/heads/master
Commit: 5a498afe027d2be76040dd26fc19e7b1fe447f1b
Parents: 18cbd6c
Author: Georg Berky <ge...@posteo.de>
Authored: Sat Sep 8 11:27:08 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Sep 8 18:40:52 2018 +0200
----------------------------------------------------------------------
.../main/java/org/apache/hc/core5/http/HttpStatus.java | 10 ++++++++++
.../hc/core5/http/impl/EnglishReasonPhraseCatalog.java | 6 +++++-
2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/5a498afe/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java b/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
index cd9f7ca..487bc67 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStatus.java
@@ -81,6 +81,11 @@ public interface HttpStatus {
*/
int SC_MULTI_STATUS = 207;
+ /**
+ * {@code 208 Already Reported} (WebDAV - RFC 5842, p.30, section 7.1)
+ */
+ int SC_ALREADY_REPORTED = 208;
+
// --- 3xx Redirection ---
/** {@code 3xx Redirection} (HTTP/1.1 - RFC 2616) */
int SC_REDIRECTION = 300;
@@ -198,6 +203,11 @@ public interface HttpStatus {
/** {@code 507 Insufficient Storage} (WebDAV - RFC 2518) */
int SC_INSUFFICIENT_STORAGE = 507;
+ /**
+ * {@code 508 Loop Detected} (WebDAV - RFC 5842, p.33, section 7.2)
+ */
+ int SC_LOOP_DETECTED = 508;
+
/** {@code 511 Network Authentication Required} (Additional HTTP Status Codes - RFC 6585) */
int SC_NETWORK_AUTHENTICATION_REQUIRED = 511;
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/5a498afe/httpcore5/src/main/java/org/apache/hc/core5/http/impl/EnglishReasonPhraseCatalog.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/EnglishReasonPhraseCatalog.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/EnglishReasonPhraseCatalog.java
index 7670cf9..9ef1375 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/EnglishReasonPhraseCatalog.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/EnglishReasonPhraseCatalog.java
@@ -91,7 +91,7 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
private static final String[][] REASON_PHRASES = new String[][]{
null,
new String[4], // 1xx
- new String[8], // 2xx
+ new String[9], // 2xx
new String[8], // 3xx
new String[32], // 4xx
new String[12] // 5xx
@@ -209,6 +209,8 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
"Processing");
setReason(HttpStatus.SC_MULTI_STATUS,
"Multi-Status");
+ setReason(HttpStatus.SC_ALREADY_REPORTED,
+ "Already Reported");
setReason(HttpStatus.SC_UNPROCESSABLE_ENTITY,
"Unprocessable Entity");
setReason(HttpStatus.SC_INSUFFICIENT_SPACE_ON_RESOURCE,
@@ -219,6 +221,8 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
"Locked");
setReason(HttpStatus.SC_INSUFFICIENT_STORAGE,
"Insufficient Storage");
+ setReason(HttpStatus.SC_LOOP_DETECTED,
+ "Loop Detected");
setReason(HttpStatus.SC_FAILED_DEPENDENCY,
"Failed Dependency");