fix bug expanding http headers