You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2026/06/03 18:07:20 UTC
(tomcat) branch 9.0.x updated: use getEnd() not getLength() when filtering ctls in header writers
This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 2d8e80f5f6 use getEnd() not getLength() when filtering ctls in header writers
2d8e80f5f6 is described below
commit 2d8e80f5f6b5b855210c8682c08f8599a6cb638b
Author: sahvx655-wq <sa...@gmail.com>
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org