Fixed redundant accept-encoding header assignments, added tests