implemented http header substitution