rackspace/python-cloudfiles — pull request #76 by kevinjqiu (2012-07-18 21:32:54+00:00)
Title: Added an option to bypass CDN

We found that since the beginning of the month, our cloudfiles requests timeout more often than usual. We added some logging and eventually found out that some of our CDN requests are timing out. Even though we have nothing stored on CDN, python-cloudfiles library still makes CDN requests because authentication service returns a CDN management url, and some of these CDN requests timeout while others return 404. This patch is to give users in the similar situation an option to bypass requests to CDN altogether by the use of `use_cdn` flag. When it is turned off, we're not going to make `cdn_connect()` request regardless of whether a CDN management url is returned from the authorization.