You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/03/08 15:51:56 UTC

[tomcat] branch main updated: Improve comments. Remove unnecessary code.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new a2a0cdf  Improve comments. Remove unnecessary code.
a2a0cdf is described below

commit a2a0cdf98cdbbf391c6568347a723f38e365f982
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Mar 8 15:51:42 2022 +0000

    Improve comments. Remove unnecessary code.
---
 java/org/apache/coyote/http11/Http11InputBuffer.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java
index fd9d18d..6757e69 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -845,8 +845,9 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler
     /**
      * Parse an HTTP header.
      *
-     * @return false after reading a blank line (which indicates that the
-     * HTTP header parsing is done
+     * @return One of {@link HeaderParseStatus#NEED_MORE_DATA},
+     * {@link HeaderParseStatus#HAVE_MORE_HEADERS} or
+     * {@link HeaderParseStatus#DONE}.
      */
     private HeaderParseStatus parseHeader() throws IOException {
 
@@ -854,8 +855,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler
 
             // Read new bytes if needed
             if (byteBuffer.position() >= byteBuffer.limit()) {
-                if (!fill(false)) {// parse header
-                    headerParsePos = HeaderParsePosition.HEADER_START;
+                if (!fill(false)) {
                     return HeaderParseStatus.NEED_MORE_DATA;
                 }
             }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org