Skip to content

Commit

Permalink
Fix #11325 Content-Length checks
Browse files Browse the repository at this point in the history
Fix #11325 by:
 + removing content-length tracking from ServletContextResponse
 + adding a setContentLengthSet field to HttpOutput
 + added HttpOutputTest for EE10/EE11
  • Loading branch information
gregw committed Dec 11, 2024
1 parent af40148 commit 6637ed1
Show file tree
Hide file tree
Showing 12 changed files with 3,404 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1145,9 +1145,7 @@ else if (crlf != null && crlf.hasRemaining())
*
* @param content The whole content to send
* @throws IOException if the send fails
* @deprecated Use {@link ResourceServlet}
*/
@Deprecated(forRemoval = true, since = "12.1.0")
public void sendContent(ByteBuffer content) throws IOException
{
if (LOG.isDebugEnabled())
Expand All @@ -1162,9 +1160,7 @@ public void sendContent(ByteBuffer content) throws IOException
*
* @param in The stream content to send
* @throws IOException if the send fails
* @deprecated Use {@link ResourceServlet}
*/
@Deprecated(forRemoval = true, since = "12.1.0")
public void sendContent(InputStream in) throws IOException
{
try (Blocker.Callback blocker = _writeBlocker.callback())
Expand All @@ -1179,9 +1175,7 @@ public void sendContent(InputStream in) throws IOException
*
* @param in The channel content to send
* @throws IOException if the send fails
* @deprecated Use {@link ResourceServlet}
*/
@Deprecated(forRemoval = true, since = "12.1.0")
public void sendContent(ReadableByteChannel in) throws IOException
{
try (Blocker.Callback blocker = _writeBlocker.callback())
Expand All @@ -1196,9 +1190,7 @@ public void sendContent(ReadableByteChannel in) throws IOException
*
* @param content The whole content to send
* @param callback The callback to use to notify success or failure
* @deprecated Use {@link ResourceServlet}
*/
@Deprecated(forRemoval = true, since = "12.1.0")
public void sendContent(ByteBuffer content, final Callback callback)
{
if (LOG.isDebugEnabled())
Expand Down Expand Up @@ -1230,9 +1222,7 @@ public void failed(Throwable x)
*
* @param in The stream content to send
* @param callback The callback to use to notify success or failure
* @deprecated Use {@link ResourceServlet}
*/
@Deprecated(forRemoval = true, since = "12.1.0")
public void sendContent(InputStream in, Callback callback)
{
if (LOG.isDebugEnabled())
Expand All @@ -1248,9 +1238,7 @@ public void sendContent(InputStream in, Callback callback)
*
* @param in The channel content to send
* @param callback The callback to use to notify success or failure
* @deprecated Use {@link ResourceServlet}
*/
@Deprecated(forRemoval = true, since = "12.1.0")
public void sendContent(ReadableByteChannel in, Callback callback)
{
if (LOG.isDebugEnabled())
Expand All @@ -1260,7 +1248,6 @@ public void sendContent(ReadableByteChannel in, Callback callback)
new ReadableByteChannelWritingCB(in, callback).iterate();
}

@Deprecated(forRemoval = true, since = "12.1.0")
private boolean prepareSendContent(int len, Callback callback)
{
try (AutoLock ignored = _channelState.lock())
Expand Down
Loading

0 comments on commit 6637ed1

Please sign in to comment.