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 17:53:30 UTC
httpcomponents-core git commit: HTTPCORE-558: add HTTP status codes
from RFC 3229
Repository: httpcomponents-core
Updated Branches:
refs/heads/master 95bb2e754 -> b4d73bf78
HTTPCORE-558: add HTTP status codes from RFC 3229
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/b4d73bf7
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/b4d73bf7
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/b4d73bf7
Branch: refs/heads/master
Commit: b4d73bf788571f28a342c83d1b129f42c86351f4
Parents: 95bb2e7
Author: Georg Berky <ge...@posteo.de>
Authored: Sat Sep 8 12:10:46 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Sep 8 19:51:01 2018 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/hc/core5/http/HttpStatus.java | 5 ++++-
.../apache/hc/core5/http/impl/EnglishReasonPhraseCatalog.java | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/b4d73bf7/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 b145908..68de8b4 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
@@ -85,11 +85,14 @@ public interface HttpStatus {
* {@code 207 Partial Update OK} (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
*/
int SC_MULTI_STATUS = 207;
-
/**
* {@code 208 Already Reported} (WebDAV - RFC 5842, p.30, section 7.1)
*/
int SC_ALREADY_REPORTED = 208;
+ /**
+ * {@code 226 IM Used} (Delta encoding in HTTP - RFC 3229, p. 30, section 10.4.1)
+ */
+ int SC_IM_USED = 226;
// --- 3xx Redirection ---
/** {@code 3xx Redirection} (HTTP/1.1 - RFC 2616) */
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/b4d73bf7/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 3d7d2a1..729f628 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[9], // 2xx
+ new String[27], // 2xx
new String[9], // 3xx
new String[52], // 4xx
new String[12] // 5xx
@@ -211,6 +211,8 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
"Multi-Status");
setReason(HttpStatus.SC_ALREADY_REPORTED,
"Already Reported");
+ setReason(HttpStatus.SC_IM_USED,
+ "IM Used");
setReason(HttpStatus.SC_UNPROCESSABLE_ENTITY,
"Unprocessable Entity");
setReason(HttpStatus.SC_INSUFFICIENT_SPACE_ON_RESOURCE,