All,
On 1/8/26 5:15 AM, Mark Thomas wrote:
On 07/01/2026 19:45, Nelson Page via users wrote:
Hi all -
First time mailing on this list, please let me know what I can improve.
I've run into a case where
org.apache.catalina.connector.Request.getParameter("some_parameter")
no longer results in the parameters getting parsed.
We're on tomcat 9.0.107, using HTTP/2, the `content-length` header is
not being set, the `content-type` header is set to
`application/x-www-form-urlencoded`, and the HTTP method is `POST`.
So I think what happens is in
https://github.com/apache/tomcat/blob/9.0.x/java/org/apache/catalina/
connector/Request.java#L3094
the `len` variable is set to -1, and we fall out in the `if` statement
below it.
Is this expected behavior?
No.
I'd need to write a test case to confirm the behaviour but that looks
like a bug.
HTTP/2 requests are not required to provide a content-length since the
HTTP/2 framing defines where the body (if any) ends.
Sorry for the noise, I wasn't thinking h/2 in my responses elsewhere and
re-opening the bug. I'll close it.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]