google-nomulus/java
jianglai 00bf8a999f Handle malformed proxy protocol header
If the proxy protocol header contains a malformatted string, such as "PROXY UNKNOWN", instead of throwing and killing the connection, use the TCP source IP as the remote IP.

Also changed how the header is read from the buffer, to avoid a potential Netty resource leak. Originally the header is read into another ByteBuf, which needs be be explicit released in order for Netty to reclaim its memory (http://netty.io/wiki/reference-counted-objects.html). Now we just read it into a byte array and let JVM GC it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188047084
2018-03-06 19:26:31 -05:00
..
com/google/testing/builddefs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
google/registry Handle malformed proxy protocol header 2018-03-06 19:26:31 -05:00