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:58:33 UTC
httpcomponents-core git commit: HTTPCORE-554: add http stats code 308
Repository: httpcomponents-core
Updated Branches:
refs/heads/master 5a498afe0 -> a31a17a5f
HTTPCORE-554: add http stats code 308
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/a31a17a5
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/a31a17a5
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/a31a17a5
Branch: refs/heads/master
Commit: a31a17a5f92c6c4cb0334ce46dbf10df8fb59bd5
Parents: 5a498af
Author: sparsick <sp...@web.de>
Authored: Sat Sep 8 11:20:10 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Sep 8 18:51:15 2018 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/hc/core5/http/HttpStatus.java | 4 ++++
.../apache/hc/core5/http/impl/EnglishReasonPhraseCatalog.java | 7 ++++---
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/a31a17a5/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 487bc67..7c367dc 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
@@ -39,6 +39,7 @@ package org.apache.hc.core5.http;
* @see <a href="https://tools.ietf.org/html/rfc7540">RFC7540 (HTTP/2)</a>
* @see <a href="https://tools.ietf.org/html/rfc6585">RFC6585 (Additional HTTP Status Codes)</a>
* @see <a href="https://tools.ietf.org/html/rfc8297">RFC8297 (Early Hints)</a>
+ * @see <a href="https://tools.ietf.org/html/rfc7538">RFC7538 (Permanent Redirect)</a>
* @since 4.0
*/
public interface HttpStatus {
@@ -105,6 +106,9 @@ public interface HttpStatus {
/** {@code 307 Temporary Redirect} (HTTP/1.1 - RFC 2616) */
int SC_TEMPORARY_REDIRECT = 307;
+ /** {@code 308 Permanent Redirect} (HTTP/1.1 - RFC 7538) */
+ int SC_PERMANENT_REDIRECT = 308;
+
// --- 4xx Client Error ---
/** {@code 4xx Client Error} (HTTP/1.1 - RFC 2616) */
int SC_CLIENT_ERROR = 400;
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/a31a17a5/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 9ef1375..db5e8ee 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
@@ -92,7 +92,7 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
null,
new String[4], // 1xx
new String[9], // 2xx
- new String[8], // 3xx
+ new String[9], // 3xx
new String[32], // 4xx
new String[12] // 5xx
};
@@ -239,8 +239,9 @@ public class EnglishReasonPhraseCatalog implements ReasonPhraseCatalog {
// Early Hints - see RFC 8297
setReason(HttpStatus.SC_EARLY_HINTS,
"Early Hints");
-
-
+ //Permanent Redirect - see RFC 7538
+ setReason(HttpStatus.SC_PERMANENT_REDIRECT,
+ "Permanent Redirect");
}