@Test public void isAnyTransformRequired_header() { Map.Entry<String, String> header = new SimpleImmutableEntry<>(HttpHeaders.LOCATION, "https: ResponseHeaderTransform locationHeaderDropHttps = ReplayManagerTestBase.createLocationHttpsToHttpTransform(); assertTrue("name match", locationHeaderDropHttps.getNameMatch().isMatchingHeaderName(header.getKey())); assertTrue("value match", locationHeaderDropHttps.getValueMatch().isMatchingHeaderValue(header.getKey(), header.getValue())); HeaderTransformInterceptor interceptor = newInterceptor(locationHeaderDropHttps); boolean anyRequired = interceptor.isAnyTransformRequired(header); assertTrue("transform required on " + header, anyRequired); }
protected boolean isAnyTransformRequired(Map.Entry<String, String> header) { return headerTransform.getNameMatch().isMatchingHeaderName(header.getKey()) && headerTransform.getValueMatch().isMatchingHeaderValue(header.getKey(), header.getValue()); }
HeaderTransformInterceptor implements ResponseInterceptor { protected boolean isAnyTransformRequired(Map.Entry<String, String> header) { return headerTransform.getNameMatch().isMatchingHeaderName(header.getKey()) && headerTransform.getValueMatch().isMatchingHeaderValue(header.getKey(), header.getValue()); } }
HeaderTransformInterceptor implements ResponseInterceptor { protected boolean isAnyTransformRequired(Map.Entry<String, String> header) { return headerTransform.getNameMatch().isMatchingHeaderName(header.getKey()) && headerTransform.getValueMatch().isMatchingHeaderValue(header.getKey(), header.getValue()); } HeaderTransformInterceptor(VhsReplayManagerConfig config, ResponseHeaderTransform headerTransform); }
HeaderTransformInterceptor implements ResponseInterceptor { protected boolean isAnyTransformRequired(Map.Entry<String, String> header) { return headerTransform.getNameMatch().isMatchingHeaderName(header.getKey()) && headerTransform.getValueMatch().isMatchingHeaderValue(header.getKey(), header.getValue()); } HeaderTransformInterceptor(VhsReplayManagerConfig config, ResponseHeaderTransform headerTransform); @Override HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable); }
HeaderTransformInterceptor implements ResponseInterceptor { protected boolean isAnyTransformRequired(Map.Entry<String, String> header) { return headerTransform.getNameMatch().isMatchingHeaderName(header.getKey()) && headerTransform.getValueMatch().isMatchingHeaderValue(header.getKey(), header.getValue()); } HeaderTransformInterceptor(VhsReplayManagerConfig config, ResponseHeaderTransform headerTransform); @Override HttpRespondable intercept(ParsedRequest parsedRequest, HttpRespondable httpRespondable);  }