# File lib/openid/kvpost.rb, line 31 def self.from_http_response(response, server_url) msg = self.from_kvform(response.body) case response.code.to_i when 200 return msg when 206 return msg when 400 raise ServerError.from_message(msg) else error_message = "bad status code from server #{server_url}: "\ "#{response.code}" raise HTTPStatusError.new(error_message) end end