Add http encode patch, fix #215