When ActiveResource does a PUT (e.g. update) to a remote RESTful rails controller that returns a
head :ok
or
render :nothing => true, :status => :ok
Everything is good. But if ActiveResource talks to a remote controller that does:
head :no_content #204
The remote controller sends back an http response of a Net::HTTPNoContent, but its Content-Length is "1" !!
I think ActiveResource should handle this weird behaviour of 'net/http' by doing a simple nil check of response.body in load_attributes_from_response(). Examples of ActiveResource seem to encourage the remote controller to return a 204 response, so that makes it more relevant to fix this.