I've created https://bz.apache.org/bugzilla/show_bug.cgi?id=69918

On Thu, Jan 8, 2026 at 10:31 AM Nelson Page <[email protected]> wrote:
>
> Mark - Thanks for the reply!  .  I'll try my hand at creating the bug.
> And after that can try writing a test, though I've never contributed
> to Tomcat before so not sure how long it will take me.
>
> Thanks,
> Nelson
>
> On Thu, Jan 8, 2026 at 2:17 AM Mark Thomas <[email protected]> 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.
> >
> > The fix is probably changing "...else if chunked..." to "...else if
> > chunked or HTTP/2..."
> >
> > We should be able to fix this for the January releases (they are a
> > little behind the usual schedule as we need to get some Tomcat Native
> > releases completed first).
> >
> > If you (or anyone else) wanted to help this along any of the following
> > would help. Ideally, we'd have all of these in this order but any help
> > with any of them would be useful.
> >
> > 1. A bug for this in Bugzilla (Tomcat version isn't that important).
> >
> > 2. A test case attached to the BZ issue in the form of a patch to the
> > Tomcat unit tests that demonstrates the issue. There should be examples
> > of all the parts required in the existing tests cases. This should
> > mostly be copy/paste. A GitHub PR also works.
> >
> > 3. A patch (or pull request) that fixes the issue and causes the test
> > case in 2 to pass.
> >
> > Cheers,
> >
> > Mark
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >

-- 
This email, including its contents and any attachment(s), may contain 
confidential and/or proprietary information and is solely for the review 
and use of the intended recipient(s). If you have received this email in 
error, please notify the sender and permanently delete this email, its 
content, and any attachment(s).  Any disclosure, copying, or taking of any 
action in reliance on an email received in error is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to