This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new fd19d85024 use getEnd() not getLength() when filtering ctls in header
writers
fd19d85024 is described below
commit fd19d8502438c6fba9327d7323b0e129a644344d
Author: sahvx655-wq <[email protected]>
AuthorDate: Wed Jun 3 23:14:56 2026 +0530
use getEnd() not getLength() when filtering ctls in header writers
---
java/org/apache/coyote/ajp/AjpMessage.java | 2 +-
java/org/apache/coyote/http11/Http11OutputBuffer.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/coyote/ajp/AjpMessage.java
b/java/org/apache/coyote/ajp/AjpMessage.java
index 59071b012f..163d410c13 100644
--- a/java/org/apache/coyote/ajp/AjpMessage.java
+++ b/java/org/apache/coyote/ajp/AjpMessage.java
@@ -156,7 +156,7 @@ public class AjpMessage {
// values will be OK. Strings using other encodings may be
// corrupted.
byte[] buffer = bc.getBuffer();
- for (int i = bc.getStart(); i < bc.getLength(); i++) {
+ for (int i = bc.getStart(); i < bc.getEnd(); i++) {
// byte values are signed i.e. -128 to 127
// The values are used unsigned. 0 to 31 are CTLs so they are
// filtered (apart from TAB which is 9). 127 is a control
(DEL).
diff --git a/java/org/apache/coyote/http11/Http11OutputBuffer.java
b/java/org/apache/coyote/http11/Http11OutputBuffer.java
index d3ca5e6ee5..0645469c2f 100644
--- a/java/org/apache/coyote/http11/Http11OutputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11OutputBuffer.java
@@ -424,7 +424,7 @@ public class Http11OutputBuffer implements HttpOutputBuffer
{
// values will be OK. Strings using other encodings may be
// corrupted.
byte[] buffer = bc.getBuffer();
- for (int i = bc.getStart(); i < bc.getLength(); i++) {
+ for (int i = bc.getStart(); i < bc.getEnd(); i++) {
// byte values are signed i.e. -128 to 127
// The values are used unsigned. 0 to 31 are CTLs so they are
// filtered (apart from TAB which is 9). 127 is a control
(DEL).
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]