use of io.netty.util.DefaultAttributeMap in project zuul by Netflix.
the class StripUntrustedProxyHeadersHandlerTest method before.
@Before
public void before() {
when(channelHandlerContext.channel()).thenReturn(channel);
DefaultAttributeMap attributeMap = new DefaultAttributeMap();
attributeMap.attr(ATTR_SSL_INFO).set(sslHandshakeInfo);
when(channel.attr(any())).thenAnswer(arg -> attributeMap.attr((AttributeKey) arg.getArguments()[0]));
headers = new DefaultHttpHeaders();
when(msg.headers()).thenReturn(headers);
headers.add(HttpHeaderNames.HOST, "netflix.com");
}
Aggregations