question: public static void replaceHttpHeaderMapNodeSpecific ( Map < String , String > httpHeaderMap , Map < String , String > requestParameters ) { boolean needToReplaceVarInHttpHeader = false ; for ( String parameter : requestParameters . keySet ( ) ) { if ( parameter . contains ( PcConstants . NODE_REQUEST_PREFIX_REPLACE_VAR ) ) { needToReplaceVarInHttpHeader = true ; break ; } } if ( ! needToReplaceVarInHttpHeader ) { logger . debug ( "No need to replace. Since there are no HTTP header variables. " ) ; return ; } for ( Entry < String , String > entry : httpHeaderMap . entrySet ( ) ) { String key = entry . getKey ( ) ; String valueOriginal = entry . getValue ( ) ; String valueUpdated = NodeReqResponse . replaceStrByMap ( requestParameters , valueOriginal ) ; httpHeaderMap . put ( key , valueUpdated ) ; } }
target:  !!!! ASSUMPTION: all VAR exists in HTTP Header must of type: APIVARREPLACE_NAME_PREFIX_HTTP_HEADER 20140310 This may be costly (O(n^2)) of the updated related # of headers; # of parameters in the requests. Better to only do it when there are some replacement in the request Parameters. a prefix : TOBE tested