Don't set body attributes if param is for url

Some small code optimizations.