bigboard r7309 - trunk/bigboard/httplib2



Author: marinaz
Date: Wed Apr 23 19:51:34 2008
New Revision: 7309
URL: http://svn.gnome.org/viewvc/bigboard?rev=7309&view=rev

Log:
Add back support for authenticating Google Apps For Your Domain accounts.

Create a README.merging file for keeping track of local changes to httplib2. 


Added:
   trunk/bigboard/httplib2/README.merging
Modified:
   trunk/bigboard/httplib2/__init__.py

Added: trunk/bigboard/httplib2/README.merging
==============================================================================
--- (empty file)
+++ trunk/bigboard/httplib2/README.merging	Wed Apr 23 19:51:34 2008
@@ -0,0 +1,24 @@
+This file lists all the changes we make locally to the upstream version of httplib2. Make sure nothing was omitted here by checking svn log for the directory:
+svn log --revision {2007-01-01}:HEAD
+
+The upstream version is maintained at http://code.google.com/p/httplib2
+
+Local changes:
+
+r6011 - Handle 404 returned from Google when authentication is required. Probably was necessary for interacting with the Google Spreadsheets API, but is not part of the latest version of the file since we are not using the Google Spreadsheets API right now.
+
+r6257 - Support authenticating Google Apps For Your Domain accounts. Added back in r7309.
+
+r6538 - Add Google Documents API service "writely". Added back in r7308.
+
+r6839 - Update to httplib 0.4.0
+
+r6840 - Return immediately with 504 if we used Cache-Control: only-if-cached; this fixes a major issue where we were doing HTTP requests synchronously in the main thread.
+Patch filed upstream:
+http://code.google.com/p/httplib2/issues/detail?id=12    
+
+r6952 - Add special support for data: urls.
+
+r7308 - Add back support for Google Documents API service "writely".
+
+r7309 - Add back support for authenticating Google Apps For Your Domain accounts.

Modified: trunk/bigboard/httplib2/__init__.py
==============================================================================
--- trunk/bigboard/httplib2/__init__.py	(original)
+++ trunk/bigboard/httplib2/__init__.py	Wed Apr 23 19:51:34 2008
@@ -573,10 +573,13 @@
             service = "cl"
         elif service == 'xapi' and request_uri.find("documents") > 0: 
             service = "writely"
+        # Google Spreadsheets service is not currenly used. If it is used in the future, check if patch from r6011 
+        # needs to be re-applied for the case when Spreadsheets API requests return 404 response when authentication 
+        # is required. 
         elif service == 'xapi' and request_uri.find("spreadsheets") > 0:
             service = "wise"
 
-        auth = dict(Email=credentials[0], Passwd=credentials[1], service=service, source=headers['user-agent'])
+        auth = dict(Email=credentials[0], Passwd=credentials[1], service=service, source=headers['user-agent'], accountType="HOSTED_OR_GOOGLE")
         resp, content = self.http.request("https://www.google.com/accounts/ClientLogin";, method="POST", body=urlencode(auth), headers={'Content-Type': 'application/x-www-form-urlencoded'})
         lines = content.split('\n')
         d = dict([tuple(line.split("=", 1)) for line in lines if line])



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]