Forward-port changes to send back xml bodies