arturobernalg opened a new pull request, #1271:
URL: https://github.com/apache/tomcat/pull/1271
`<%@ page buffer="0kb" %>` is rejected with a translation error ("Page
directive: invalid value for buffer"), so the page fails with a 500.
The Jakarta Pages specification (page directive, `buffer="none|sizekb"`)
says: "The size can only be specified in kilobytes. The suffix kb is mandatory
or a translation error must occur. If a buffer size is specified then output is
buffered with a buffer size not less than that specified." The `buffer` element
of `jsp-property-group` takes "those of the buffer page directive". A size of
0kb is therefore valid, and it means no buffering.
This accepts 0kb again. Negative sizes and sizes that would overflow when
converted to bytes are still rejected. `testBufferZero` now expects the page to
work; it fails without the change.
Tested on a Tomcat built from this branch: `0kb` gives 200 with a buffer
size of 0, as `none` does; `16kb` gives 16384; `-1kb` still fails translation.
`buffer="0kb" autoFlush="false"` is still a translation error, as with `none`.
The Jasper tests pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]