Strange, because what I meant is that append_to_reply() is doing same operation as done by xhttp_reply() when it has to add content-type header. Adding body is another type of operation. Can you try with content-type parameter and an empty string for body parameter?