rsolr/rsolr — pull request #77 by blackwinter (2014-03-24 13:26:55+00:00)
Title: Client HEAD requests and response evaluation.

### HEAD requests don't have a response body to evaluate

The response of a HEAD request should never be evaluated. It's unnecessary and even causes an error with the new JSON evaluation because the empty string (`nil.to_s`) is invalid JSON syntax. I opted for an empty string as return value for two reasons:

1. `nil` is a singleton, so subsequent HEAD requests overwrite the request and response information of earlier HEAD requests.
2. The return value of a HEAD request shouldn't matter anyway, because it's not allowed to return a message-body in the response. An empty string seems to be in line with "raw" responses which also return strings.

This is not fully backwards compatible due to the changed return value, but nobody should have relied on that to begin with. This also fixes #74.

### Distinguish evaluated and raw responses by `wt' type

It seems to be convenient to associate evaluated and raw responses with different types of the `wt` parameter. A symbol means the response will be evaluated (or fails if unsupported), a string means the response will be returned in its raw form. This also fixes the documented behaviour of `:ruby` vs. `'ruby'` which currently doesn't work..

However, this also means that other documented behaviour (namely XML: `solr.get 'select', :params => {:wt => :xml}`) won't work anymore. Hence, this change is not backwards compatible.