In its simplest invocation, xargs is like a filter that takes as input a list (with each member on a single line). The tool puts those members on a single space-delimited line.
The before filter has identified Mobile Safari, changed the response format, and is now attempting to serve the response inline with Rails conventions.