This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 964d0cbd6e use getEnd() not getLength() when filtering ctls in header
writers
964d0cbd6e is described below
commit 964d0cbd6e2f34937431864e943570b2ec228a3a
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 f943611949..e94efd5e43 100644
--- a/java/org/apache/coyote/http11/Http11OutputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11OutputBuffer.java
@@ -413,7 +413,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]