Version 1.1.1
This commit is contained in:
parent
1c4b20e11c
commit
71467db442
6 changed files with 26 additions and 17 deletions
|
@ -1 +1 @@
|
||||||
future-release=1.1.0
|
future-release=1.1.2
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.1.1](https://github.com/ethauvin/httpstatus/tree/1.1.1) (2024-06-07)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.1.0...1.1.1)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Sort command line output [\#10](https://github.com/ethauvin/HttpStatus/issues/10)
|
||||||
|
- Update reasons properties status codes [\#9](https://github.com/ethauvin/HttpStatus/issues/9)
|
||||||
|
|
||||||
## [1.1.0](https://github.com/ethauvin/httpstatus/tree/1.1.0) (2023-09-29)
|
## [1.1.0](https://github.com/ethauvin/httpstatus/tree/1.1.0) (2023-09-29)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.0.5...1.1.0)
|
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.0.5...1.1.0)
|
||||||
|
|
10
README.md
10
README.md
|
@ -72,7 +72,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.0'
|
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.1'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ As a `Maven` artifact:
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.thauvin.erik.httpstatus</groupId>
|
<groupId>net.thauvin.erik.httpstatus</groupId>
|
||||||
<artifactId>httpstatus</artifactId>
|
<artifactId>httpstatus</artifactId>
|
||||||
<version>1.1.0</version>
|
<version>1.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ The reasons are defined in a [ResourceBundle](https://docs.oracle.com/en/java/ja
|
||||||
You can query the reason phrase for status codes as follows:
|
You can query the reason phrase for status codes as follows:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ java -jar httpstatus-1.1.0.jar 404 500
|
$ java -jar httpstatus-1.1.1.jar 404 500
|
||||||
404: Not Found
|
404: Not Found
|
||||||
500: Internal Server Error
|
500: Internal Server Error
|
||||||
```
|
```
|
||||||
|
@ -323,7 +323,7 @@ $ java -jar httpstatus-1.1.0.jar 404 500
|
||||||
If no status code is specified, all will be printed:
|
If no status code is specified, all will be printed:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ java -jar httpstatus-1.1.0.jar
|
$ java -jar httpstatus-1.1.1.jar
|
||||||
100: Continue
|
100: Continue
|
||||||
101: Switching Protocols
|
101: Switching Protocols
|
||||||
102: Processing
|
102: Processing
|
||||||
|
@ -343,7 +343,7 @@ $ java -jar httpstatus-1.1.0.jar
|
||||||
You can also print status codes by [response classes](https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes):
|
You can also print status codes by [response classes](https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes):
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ java -jar httpstatus-1.1.0.jar 2xx
|
$ java -jar httpstatus-1.1.1.jar 2xx
|
||||||
200: OK
|
200: OK
|
||||||
201: Created
|
201: Created
|
||||||
202: Accepted
|
202: Accepted
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>net.thauvin.erik.httpstatus</groupId>
|
<groupId>net.thauvin.erik.httpstatus</groupId>
|
||||||
<artifactId>httpstatus</artifactId>
|
<artifactId>httpstatus</artifactId>
|
||||||
<version>1.1.1-SNAPSHOT</version>
|
<version>1.1.1</version>
|
||||||
<name>HttpStatus</name>
|
<name>HttpStatus</name>
|
||||||
<description>Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages</description>
|
<description>Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages</description>
|
||||||
<url>https://github.com/ethauvin/HttpStatus</url>
|
<url>https://github.com/ethauvin/HttpStatus</url>
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class HttpStatusBuild extends Project {
|
||||||
public HttpStatusBuild() {
|
public HttpStatusBuild() {
|
||||||
pkg = "net.thauvin.erik.httpstatus";
|
pkg = "net.thauvin.erik.httpstatus";
|
||||||
name = "HttpStatus";
|
name = "HttpStatus";
|
||||||
version = version(1, 1, 1, "SNAPSHOT");
|
version = version(1, 1, 1);
|
||||||
|
|
||||||
var description = "Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages";
|
var description = "Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages";
|
||||||
var url = "https://github.com/ethauvin/HttpStatus";
|
var url = "https://github.com/ethauvin/HttpStatus";
|
||||||
|
|
|
@ -99,23 +99,23 @@ public final class Reasons {
|
||||||
public static void main(String... args) {
|
public static void main(String... args) {
|
||||||
var keys = new TreeSet<>(REASON_PHRASES.keySet());
|
var keys = new TreeSet<>(REASON_PHRASES.keySet());
|
||||||
if (args.length >= 1) {
|
if (args.length >= 1) {
|
||||||
for (var key : args) {
|
for (var arg : args) {
|
||||||
if (key.endsWith("xx")) {
|
if (arg.endsWith("xx")) { // e.g.: 2xx
|
||||||
var responseClass = key.charAt(0);
|
var responseClass = arg.charAt(0);
|
||||||
keys.forEach((k) -> {
|
keys.forEach(k -> {
|
||||||
if (k.charAt(0) == responseClass) {
|
if (k.charAt(0) == responseClass) {
|
||||||
System.out.println(k + ": " + REASON_PHRASES.get(k));
|
System.out.println(k + ": " + REASON_PHRASES.get(k));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else { // e.g.: 404
|
||||||
var value = REASON_PHRASES.get(key);
|
var value = REASON_PHRASES.get(arg);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
System.out.println(key + ": " + value);
|
System.out.println(arg + ": " + value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else { // Print all
|
||||||
keys.forEach((k) -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
|
keys.forEach(k -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
|
||||||
System.out.println("Total: " + REASON_PHRASES.size());
|
System.out.println("Total: " + REASON_PHRASES.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue