netty5/handler-proxy/src
feijermu 0c3eae34ec
fix a potential ByteBuf leak in HttpProxyHandler. (#10130)
Motivation:

An exception may occur between ByteBuf's allocation and release. For example:
```java
java.lang.OutOfMemoryError: Java heap space
	at java.lang.String.<init>(String.java:325)
	at io.netty.buffer.ByteBufUtil.decodeString(ByteBufUtil.java:838)
	at io.netty.buffer.AbstractByteBuf.toString(AbstractByteBuf.java:1247)
	at io.netty.buffer.AbstractByteBuf.toString(AbstractByteBuf.java:1242)
	at io.netty.handler.proxy.HttpProxyHandler.<init>(HttpProxyHandler.java:105)
	at io.netty.handler.proxy.HttpProxyHandler.<init>(HttpProxyHandler.java:90)
	at io.netty.handler.proxy.HttpProxyHandler.<init>(HttpProxyHandler.java:85)
```
It may cause the ByteBuf variable authz and authzBase64's leak.

Modification:

Release the ByteBuf in a finally block as soon as possible.

Result:

Fix a potential ByteBuf leak.
2020-03-24 11:17:40 +01:00
..
main/java/io/netty/handler/proxy fix a potential ByteBuf leak in HttpProxyHandler. (#10130) 2020-03-24 11:17:40 +01:00
test/java/io/netty/handler/proxy Ensure WebSocket*Handshaker can not corrupt pipeline when HttpProxyHa… (#10103) 2020-03-16 11:38:41 +01:00