puppetlabs/puppetdb — pull request #320 by nicklewis (2012-10-12 18:35:58+00:00)
Title: Fix default body for static resources

This function checks whether there is a body present before attempting
to set one, and was trying to call `(empty? body)` to do so.
Unfortunately, when serving static files, `body` is an instance of
java.io.File, which naturally doesn't implement ISeq. Now we just check
for the presence of `body`, rather than any particular predicate. This
seems more correct anyway, as it's perfectly reasonable that the correct
response for some routes may indeed be an empty string.

This also adds a test for the / redirect to the dashboard, which has
broken in the past.