opscode/ohai — pull request #126 by javmorin (2013-02-05 18:32:48+00:00)
Title: Ohai 441 - Fix infinite recursive by restoring support for 2008-02-01 EC2 API support

Older EC2 instances still only respond to the old API's. The current code takes
no notice of the response and tries to parse the 'Not Found' page. This reuslts
in a never ending recursive loop.

This fix adds checks for response codes, and falls back to the old '2008-02-01'
API if a request on the new API fails. It's a stateless setup, so it will always
try the new API first, then the old.