[maemo-commits] [maemo-commits] r14880 - projects/haf/trunk/apt

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Dec 6 18:08:03 EET 2007
Author: marivoll
Date: 2007-12-06 18:07:56 +0200 (Thu, 06 Dec 2007)
New Revision: 14880

Added:
   projects/haf/trunk/apt/http-tablet-identification.patch
Log:
New.


Added: projects/haf/trunk/apt/http-tablet-identification.patch
===================================================================
--- projects/haf/trunk/apt/http-tablet-identification.patch	2007-12-06 16:00:44 UTC (rev 14879)
+++ projects/haf/trunk/apt/http-tablet-identification.patch	2007-12-06 16:07:56 UTC (rev 14880)
@@ -0,0 +1,26 @@
+Index: methods/http.cc
+===================================================================
+--- methods/http.cc	(revision 14875)
++++ methods/http.cc	(working copy)
+@@ -714,6 +714,21 @@
+    if (Uri.User.empty() == false || Uri.Password.empty() == false)
+       Req += string("Authorization: Basic ") + 
+           Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
++   else
++     {
++       const char *product_hardware = getenv ("OSSO_PRODUCT_HARDWARE");
++       if (product_hardware)
++	 {
++	   /* This is a cookie that identifies Internet Tablets to the
++	      server.  We use the Authorization header since that is
++	      easier to handle on the server side.
++	   */
++	   string user = string ("NOKIA-OSSO-") + string (product_hardware);
++	   Req += (string("Authorization: Basic ") + 
++		   Base64Encode(user + ":" + "JOSHUA")
++		   + "\r\n");
++	 }
++     }
+    
+    Req += "User-Agent: Debian APT-HTTP/1.3 ("VERSION")\r\n\r\n";
+    


More information about the maemo-commits mailing list