This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 5e5198fe45 Fix output formatting. Flags appear before width.
5e5198fe45 is described below
commit 5e5198fe4562dee844706179ae545ed5678b8823
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Mar 18 11:20:44 2025 +0000
Fix output formatting. Flags appear before width.
---
.../tomcat/util/http/parser/StructuredField.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/java/org/apache/tomcat/util/http/parser/StructuredField.java
b/java/org/apache/tomcat/util/http/parser/StructuredField.java
index c6532d5320..c5072b354a 100644
--- a/java/org/apache/tomcat/util/http/parser/StructuredField.java
+++ b/java/org/apache/tomcat/util/http/parser/StructuredField.java
@@ -201,7 +201,7 @@ public class StructuredField {
item = parseSfBoolean(input);
} else {
throw new IllegalArgumentException(
- sm.getString("sf.bareitem.invalidCharacter",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.bareitem.invalidCharacter",
String.format("\\u%04X", Integer.valueOf(c))));
}
return item;
@@ -234,7 +234,7 @@ public class StructuredField {
int c = input.read();
if (!isKeyFirst(c)) {
throw new IllegalArgumentException(
- sm.getString("sf.key.invalidFirstCharacter",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.key.invalidFirstCharacter",
String.format("\\u%04X", Integer.valueOf(c))));
}
while (c != -1 && isKey(c)) {
@@ -264,7 +264,7 @@ public class StructuredField {
if (!HttpParser.isNumeric(c)) {
throw new IllegalArgumentException(
- sm.getString("sf.numeric.invalidCharacter",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.numeric.invalidCharacter",
String.format("\\u%04X", Integer.valueOf(c))));
}
result.append((char) c);
input.mark(1);
@@ -321,7 +321,7 @@ public class StructuredField {
c = input.read();
if (c != '\\' && c != '\"') {
throw new IllegalArgumentException(
- sm.getString("sf.string.invalidEscape",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.string.invalidEscape",
String.format("\\u%04X", Integer.valueOf(c))));
}
} else {
if (c == '\"') {
@@ -330,7 +330,7 @@ public class StructuredField {
// This test also covers unexpected EOF
if (c < 32 || c > 126) {
throw new IllegalArgumentException(
- sm.getString("sf.string.invalidCharacter",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.string.invalidCharacter",
String.format("\\u%04X", Integer.valueOf(c))));
}
}
result.append((char) c);
@@ -372,7 +372,7 @@ public class StructuredField {
base64.append((char) c);
} else {
throw new IllegalArgumentException(
- sm.getString("sf.base64.invalidCharacter",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.base64.invalidCharacter",
String.format("\\u%04X", Integer.valueOf(c))));
}
}
@@ -390,7 +390,7 @@ public class StructuredField {
return new SfBoolean(false);
} else {
throw new IllegalArgumentException(
- sm.getString("sf.boolean.invalidCharacter",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.boolean.invalidCharacter",
String.format("\\u%04X", Integer.valueOf(c))));
}
}
@@ -425,7 +425,7 @@ public class StructuredField {
}
}
throw new IllegalArgumentException(
- sm.getString("sf.invalidCharacter", String.format("\\u%40X",
Integer.valueOf(c))));
+ sm.getString("sf.invalidCharacter", String.format("\\u%04X",
Integer.valueOf(c))));
}
@@ -434,7 +434,7 @@ public class StructuredField {
int c = input.read();
if (c == required) {
throw new IllegalArgumentException(
- sm.getString("sf.invalidCharacter",
String.format("\\u%40X", Integer.valueOf(c))));
+ sm.getString("sf.invalidCharacter",
String.format("\\u%04X", Integer.valueOf(c))));
}
input.reset();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]