splitBody, getHeader become synchronous functions