Adding magic encoding for http